Skip to content

Commit

Permalink
Format code according to PSR2
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Apr 10, 2020
1 parent 28f8eb5 commit 734c62b
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 10 deletions.
3 changes: 1 addition & 2 deletions apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
use Sabre\DAV\IFile;
use Sabre\DAV\INode;

class Directory extends \OCA\DAV\Connector\Sabre\Node
implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {
class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {

/**
* Cached directory content
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/Files/FileSearchBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ private function extractWhereValue(Operator &$operator, string $propertyName, st
} else {
return null;
}
// no break
default:
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/CardDAV/ConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use PHPUnit_Framework_MockObject_MockObject;
use Test\TestCase;

class ConverterTest extends TestCase {
class ConverterTest extends TestCase {

/** @var AccountManager | PHPUnit_Framework_MockObject_MockObject */
private $accountManager;
Expand Down
2 changes: 1 addition & 1 deletion apps/encryption/lib/Settings/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use OCP\IUserSession;
use OCP\Settings\ISettings;

class Personal implements ISettings {
class Personal implements ISettings {

/** @var IConfig */
private $config;
Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Sabre/AbstractTrashFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\IFile;

abstract class AbstractTrashFile extends AbstractTrash implements IFile , ITrash {
abstract class AbstractTrashFile extends AbstractTrash implements IFile, ITrash {
public function put($data) {
throw new Forbidden();
}
Expand Down
1 change: 1 addition & 0 deletions apps/user_ldap/lib/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ public function getConfiguration() {
$result[$dbkey] = implode("\n", $config[$configkey]);
break;
} //else follows default
// no break
default:
$result[$dbkey] = $config[$configkey];
}
Expand Down
1 change: 1 addition & 0 deletions core/Command/Config/System/SetConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ protected function castValue($value, $type) {
throw new \InvalidArgumentException('Unable to parse value as boolean');
}

// no break
case 'null':
return [
'value' => null,
Expand Down
2 changes: 1 addition & 1 deletion lib/private/AppFramework/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function __get($name) {
case 'parameters':
case 'params':
return $this->getContent();
default;
default:
return isset($this[$name])
? $this[$name]
: null;
Expand Down
1 change: 1 addition & 0 deletions lib/private/Files/Cache/QuerySearchHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function searchOperatorToDBExpr(IQueryBuilder $builder, ISearchOperator $
} else {
throw new \InvalidArgumentException('Binary operators inside "not" is not supported');
}
// no break
case ISearchBinaryOperator::OPERATOR_AND:
return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments()));
case ISearchBinaryOperator::OPERATOR_OR:
Expand Down
1 change: 1 addition & 0 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ public function fopen($path, $mode) {
} else {
return false;
}
// no break
case 'w':
case 'wb':
case 'w+':
Expand Down
1 change: 1 addition & 0 deletions lib/private/Files/Storage/Flysystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public function fopen($path, $mode) {
case 'wb':
case 'wb+':
$useExisting = false;
// no break
case 'a':
case 'ab':
case 'r+':
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Group/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
/**
* Class for group management in a SQL Database (e.g. MySQL, SQLite)
*/
class Database extends ABackend
implements IAddToGroupBackend,
class Database extends ABackend implements
IAddToGroupBackend,
ICountDisabledInGroup,
ICountUsersBackend,
ICreateGroupBackend,
Expand Down
5 changes: 5 additions & 0 deletions lib/private/L10N/LanguageIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function current(): string {
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
// no break
case 1:
$forcedLang = $this->config->getSystemValue('force_language', false);
if (is_string($forcedLang)
Expand All @@ -73,13 +74,15 @@ public function current(): string {
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
// no break
case 2:
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
if (is_string($userLang)) {
return $userLang;
}
$this->next();
/** @noinspection PhpMissingBreakStatementInspection */
// no break
case 3:
$userLang = $this->config->getUserValue($this->user->getUID(), 'core', 'lang', null);
if (is_string($userLang)
Expand All @@ -88,6 +91,7 @@ public function current(): string {
return $truncated;
}
$this->next();
// no break
case 4:
return $this->config->getSystemValue('default_language', 'en');
/** @noinspection PhpMissingBreakStatementInspection */
Expand All @@ -97,6 +101,7 @@ public function current(): string {
return $truncated;
}
$this->next();
// no break
default:
return 'en';
}
Expand Down
2 changes: 2 additions & 0 deletions lib/private/MemoryInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ private function memoryLimitToBytes(string $memoryLimit): int {
switch ($last) {
case 'g':
$memoryLimit *= 1024;
// no break
case 'm':
$memoryLimit *= 1024;
// no break
case 'k':
$memoryLimit *= 1024;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/private/User/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
/**
* Class for user management in a SQL Database (e.g. MySQL, SQLite)
*/
class Database extends ABackend
implements ICreateUserBackend,
class Database extends ABackend implements
ICreateUserBackend,
ISetPasswordBackend,
ISetDisplayNameBackend,
IGetDisplayNameBackend,
Expand Down

0 comments on commit 734c62b

Please sign in to comment.