Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
28f8eb5dba
commit
734c62bee0
|
@ -50,8 +50,7 @@ use Sabre\DAV\Exception\ServiceUnavailable;
|
||||||
use Sabre\DAV\IFile;
|
use Sabre\DAV\IFile;
|
||||||
use Sabre\DAV\INode;
|
use Sabre\DAV\INode;
|
||||||
|
|
||||||
class Directory extends \OCA\DAV\Connector\Sabre\Node
|
class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {
|
||||||
implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cached directory content
|
* Cached directory content
|
||||||
|
|
|
@ -428,6 +428,7 @@ class FileSearchBackend implements ISearchBackend {
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ use OCP\IUser;
|
||||||
use PHPUnit_Framework_MockObject_MockObject;
|
use PHPUnit_Framework_MockObject_MockObject;
|
||||||
use Test\TestCase;
|
use Test\TestCase;
|
||||||
|
|
||||||
class ConverterTest extends TestCase {
|
class ConverterTest extends TestCase {
|
||||||
|
|
||||||
/** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
|
/** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $accountManager;
|
private $accountManager;
|
||||||
|
|
|
@ -30,7 +30,7 @@ use OCP\IConfig;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\Settings\ISettings;
|
use OCP\Settings\ISettings;
|
||||||
|
|
||||||
class Personal implements ISettings {
|
class Personal implements ISettings {
|
||||||
|
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
private $config;
|
private $config;
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace OCA\Files_Trashbin\Sabre;
|
||||||
use Sabre\DAV\Exception\Forbidden;
|
use Sabre\DAV\Exception\Forbidden;
|
||||||
use Sabre\DAV\IFile;
|
use Sabre\DAV\IFile;
|
||||||
|
|
||||||
abstract class AbstractTrashFile extends AbstractTrash implements IFile , ITrash {
|
abstract class AbstractTrashFile extends AbstractTrash implements IFile, ITrash {
|
||||||
public function put($data) {
|
public function put($data) {
|
||||||
throw new Forbidden();
|
throw new Forbidden();
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,6 +348,7 @@ class Connection extends LDAPUtility {
|
||||||
$result[$dbkey] = implode("\n", $config[$configkey]);
|
$result[$dbkey] = implode("\n", $config[$configkey]);
|
||||||
break;
|
break;
|
||||||
} //else follows default
|
} //else follows default
|
||||||
|
// no break
|
||||||
default:
|
default:
|
||||||
$result[$dbkey] = $config[$configkey];
|
$result[$dbkey] = $config[$configkey];
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@ class SetConfig extends Base {
|
||||||
throw new \InvalidArgumentException('Unable to parse value as boolean');
|
throw new \InvalidArgumentException('Unable to parse value as boolean');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no break
|
||||||
case 'null':
|
case 'null':
|
||||||
return [
|
return [
|
||||||
'value' => null,
|
'value' => null,
|
||||||
|
|
|
@ -282,7 +282,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
||||||
case 'parameters':
|
case 'parameters':
|
||||||
case 'params':
|
case 'params':
|
||||||
return $this->getContent();
|
return $this->getContent();
|
||||||
default;
|
default:
|
||||||
return isset($this[$name])
|
return isset($this[$name])
|
||||||
? $this[$name]
|
? $this[$name]
|
||||||
: null;
|
: null;
|
||||||
|
|
|
@ -110,6 +110,7 @@ class QuerySearchHelper {
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException('Binary operators inside "not" is not supported');
|
throw new \InvalidArgumentException('Binary operators inside "not" is not supported');
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
case ISearchBinaryOperator::OPERATOR_AND:
|
case ISearchBinaryOperator::OPERATOR_AND:
|
||||||
return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments()));
|
return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments()));
|
||||||
case ISearchBinaryOperator::OPERATOR_OR:
|
case ISearchBinaryOperator::OPERATOR_OR:
|
||||||
|
|
|
@ -304,6 +304,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
case 'w':
|
case 'w':
|
||||||
case 'wb':
|
case 'wb':
|
||||||
case 'w+':
|
case 'w+':
|
||||||
|
|
|
@ -189,6 +189,7 @@ abstract class Flysystem extends Common {
|
||||||
case 'wb':
|
case 'wb':
|
||||||
case 'wb+':
|
case 'wb+':
|
||||||
$useExisting = false;
|
$useExisting = false;
|
||||||
|
// no break
|
||||||
case 'a':
|
case 'a':
|
||||||
case 'ab':
|
case 'ab':
|
||||||
case 'r+':
|
case 'r+':
|
||||||
|
|
|
@ -60,8 +60,8 @@ use OCP\IDBConnection;
|
||||||
/**
|
/**
|
||||||
* Class for group management in a SQL Database (e.g. MySQL, SQLite)
|
* Class for group management in a SQL Database (e.g. MySQL, SQLite)
|
||||||
*/
|
*/
|
||||||
class Database extends ABackend
|
class Database extends ABackend implements
|
||||||
implements IAddToGroupBackend,
|
IAddToGroupBackend,
|
||||||
ICountDisabledInGroup,
|
ICountDisabledInGroup,
|
||||||
ICountUsersBackend,
|
ICountUsersBackend,
|
||||||
ICreateGroupBackend,
|
ICreateGroupBackend,
|
||||||
|
|
|
@ -64,6 +64,7 @@ class LanguageIterator implements ILanguageIterator {
|
||||||
}
|
}
|
||||||
$this->next();
|
$this->next();
|
||||||
/** @noinspection PhpMissingBreakStatementInspection */
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
|
// no break
|
||||||
case 1:
|
case 1:
|
||||||
$forcedLang = $this->config->getSystemValue('force_language', false);
|
$forcedLang = $this->config->getSystemValue('force_language', false);
|
||||||
if (is_string($forcedLang)
|
if (is_string($forcedLang)
|
||||||
|
@ -73,6 +74,7 @@ class LanguageIterator implements ILanguageIterator {
|
||||||
}
|
}
|
||||||
$this->next();
|
$this->next();
|
||||||
/** @noinspection PhpMissingBreakStatementInspection */
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
|
// no break
|
||||||
case 2:
|
case 2:
|
||||||
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
|
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
|
||||||
if (is_string($userLang)) {
|
if (is_string($userLang)) {
|
||||||
|
@ -80,6 +82,7 @@ class LanguageIterator implements ILanguageIterator {
|
||||||
}
|
}
|
||||||
$this->next();
|
$this->next();
|
||||||
/** @noinspection PhpMissingBreakStatementInspection */
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
|
// no break
|
||||||
case 3:
|
case 3:
|
||||||
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
|
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
|
||||||
if (is_string($userLang)
|
if (is_string($userLang)
|
||||||
|
@ -88,6 +91,7 @@ class LanguageIterator implements ILanguageIterator {
|
||||||
return $truncated;
|
return $truncated;
|
||||||
}
|
}
|
||||||
$this->next();
|
$this->next();
|
||||||
|
// no break
|
||||||
case 4:
|
case 4:
|
||||||
return $this->config->getSystemValue('default_language', 'en');
|
return $this->config->getSystemValue('default_language', 'en');
|
||||||
/** @noinspection PhpMissingBreakStatementInspection */
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
|
@ -97,6 +101,7 @@ class LanguageIterator implements ILanguageIterator {
|
||||||
return $truncated;
|
return $truncated;
|
||||||
}
|
}
|
||||||
$this->next();
|
$this->next();
|
||||||
|
// no break
|
||||||
default:
|
default:
|
||||||
return 'en';
|
return 'en';
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,8 +72,10 @@ class MemoryInfo {
|
||||||
switch ($last) {
|
switch ($last) {
|
||||||
case 'g':
|
case 'g':
|
||||||
$memoryLimit *= 1024;
|
$memoryLimit *= 1024;
|
||||||
|
// no break
|
||||||
case 'm':
|
case 'm':
|
||||||
$memoryLimit *= 1024;
|
$memoryLimit *= 1024;
|
||||||
|
// no break
|
||||||
case 'k':
|
case 'k':
|
||||||
$memoryLimit *= 1024;
|
$memoryLimit *= 1024;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,8 @@ use OCP\User\Backend\ISetPasswordBackend;
|
||||||
/**
|
/**
|
||||||
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
|
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
|
||||||
*/
|
*/
|
||||||
class Database extends ABackend
|
class Database extends ABackend implements
|
||||||
implements ICreateUserBackend,
|
ICreateUserBackend,
|
||||||
ISetPasswordBackend,
|
ISetPasswordBackend,
|
||||||
ISetDisplayNameBackend,
|
ISetDisplayNameBackend,
|
||||||
IGetDisplayNameBackend,
|
IGetDisplayNameBackend,
|
||||||
|
|
Loading…
Reference in New Issue