@@ -25,17 +25,17 @@ |
||
25 | 25 | use OCP\DB\QueryBuilder\IParameter; |
26 | 26 | |
27 | 27 | class Parameter implements IParameter { |
28 | - /** @var mixed */ |
|
29 | - protected $name; |
|
28 | + /** @var mixed */ |
|
29 | + protected $name; |
|
30 | 30 | |
31 | - public function __construct($name) { |
|
32 | - $this->name = $name; |
|
33 | - } |
|
31 | + public function __construct($name) { |
|
32 | + $this->name = $name; |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * @return string |
|
37 | - */ |
|
38 | - public function __toString() { |
|
39 | - return (string) $this->name; |
|
40 | - } |
|
35 | + /** |
|
36 | + * @return string |
|
37 | + */ |
|
38 | + public function __toString() { |
|
39 | + return (string) $this->name; |
|
40 | + } |
|
41 | 41 | } |
@@ -25,32 +25,32 @@ |
||
25 | 25 | use Doctrine\DBAL\Schema\Schema; |
26 | 26 | |
27 | 27 | class PostgreSqlMigrator extends Migrator { |
28 | - /** |
|
29 | - * @param Schema $targetSchema |
|
30 | - * @param \Doctrine\DBAL\Connection $connection |
|
31 | - * @return \Doctrine\DBAL\Schema\SchemaDiff |
|
32 | - */ |
|
33 | - protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { |
|
34 | - $schemaDiff = parent::getDiff($targetSchema, $connection); |
|
28 | + /** |
|
29 | + * @param Schema $targetSchema |
|
30 | + * @param \Doctrine\DBAL\Connection $connection |
|
31 | + * @return \Doctrine\DBAL\Schema\SchemaDiff |
|
32 | + */ |
|
33 | + protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) { |
|
34 | + $schemaDiff = parent::getDiff($targetSchema, $connection); |
|
35 | 35 | |
36 | - foreach ($schemaDiff->changedTables as $tableDiff) { |
|
37 | - // fix default value in brackets - pg 9.4 is returning a negative default value in () |
|
38 | - // see https://github.com/doctrine/dbal/issues/2427 |
|
39 | - foreach ($tableDiff->changedColumns as $column) { |
|
40 | - $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
41 | - if ($changedProperties !== 'default') { |
|
42 | - return true; |
|
43 | - } |
|
44 | - $fromDefault = $column->fromColumn->getDefault(); |
|
45 | - $toDefault = $column->column->getDefault(); |
|
46 | - $fromDefault = trim($fromDefault, "()"); |
|
36 | + foreach ($schemaDiff->changedTables as $tableDiff) { |
|
37 | + // fix default value in brackets - pg 9.4 is returning a negative default value in () |
|
38 | + // see https://github.com/doctrine/dbal/issues/2427 |
|
39 | + foreach ($tableDiff->changedColumns as $column) { |
|
40 | + $column->changedProperties = array_filter($column->changedProperties, function ($changedProperties) use ($column) { |
|
41 | + if ($changedProperties !== 'default') { |
|
42 | + return true; |
|
43 | + } |
|
44 | + $fromDefault = $column->fromColumn->getDefault(); |
|
45 | + $toDefault = $column->column->getDefault(); |
|
46 | + $fromDefault = trim($fromDefault, "()"); |
|
47 | 47 | |
48 | - // by intention usage of != |
|
49 | - return $fromDefault != $toDefault; |
|
50 | - }); |
|
51 | - } |
|
52 | - } |
|
48 | + // by intention usage of != |
|
49 | + return $fromDefault != $toDefault; |
|
50 | + }); |
|
51 | + } |
|
52 | + } |
|
53 | 53 | |
54 | - return $schemaDiff; |
|
55 | - } |
|
54 | + return $schemaDiff; |
|
55 | + } |
|
56 | 56 | } |
@@ -22,31 +22,31 @@ |
||
22 | 22 | namespace OC\App\AppStore\Version; |
23 | 23 | |
24 | 24 | class Version { |
25 | - /** @var string */ |
|
26 | - private $minVersion; |
|
27 | - /** @var string */ |
|
28 | - private $maxVersion; |
|
25 | + /** @var string */ |
|
26 | + private $minVersion; |
|
27 | + /** @var string */ |
|
28 | + private $maxVersion; |
|
29 | 29 | |
30 | - /** |
|
31 | - * @param string $minVersion |
|
32 | - * @param string $maxVersion |
|
33 | - */ |
|
34 | - public function __construct($minVersion, $maxVersion) { |
|
35 | - $this->minVersion = $minVersion; |
|
36 | - $this->maxVersion = $maxVersion; |
|
37 | - } |
|
30 | + /** |
|
31 | + * @param string $minVersion |
|
32 | + * @param string $maxVersion |
|
33 | + */ |
|
34 | + public function __construct($minVersion, $maxVersion) { |
|
35 | + $this->minVersion = $minVersion; |
|
36 | + $this->maxVersion = $maxVersion; |
|
37 | + } |
|
38 | 38 | |
39 | - /** |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getMinimumVersion() { |
|
43 | - return $this->minVersion; |
|
44 | - } |
|
39 | + /** |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getMinimumVersion() { |
|
43 | + return $this->minVersion; |
|
44 | + } |
|
45 | 45 | |
46 | - /** |
|
47 | - * @return string |
|
48 | - */ |
|
49 | - public function getMaximumVersion() { |
|
50 | - return $this->maxVersion; |
|
51 | - } |
|
46 | + /** |
|
47 | + * @return string |
|
48 | + */ |
|
49 | + public function getMaximumVersion() { |
|
50 | + return $this->maxVersion; |
|
51 | + } |
|
52 | 52 | } |
@@ -28,41 +28,41 @@ |
||
28 | 28 | use OCP\Preview\IProvider; |
29 | 29 | |
30 | 30 | abstract class Provider implements IProvider { |
31 | - private $options; |
|
31 | + private $options; |
|
32 | 32 | |
33 | - /** |
|
34 | - * Constructor |
|
35 | - * |
|
36 | - * @param array $options |
|
37 | - */ |
|
38 | - public function __construct(array $options = []) { |
|
39 | - $this->options = $options; |
|
40 | - } |
|
33 | + /** |
|
34 | + * Constructor |
|
35 | + * |
|
36 | + * @param array $options |
|
37 | + */ |
|
38 | + public function __construct(array $options = []) { |
|
39 | + $this->options = $options; |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * @return string Regex with the mimetypes that are supported by this provider |
|
44 | - */ |
|
45 | - abstract public function getMimeType(); |
|
42 | + /** |
|
43 | + * @return string Regex with the mimetypes that are supported by this provider |
|
44 | + */ |
|
45 | + abstract public function getMimeType(); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Check if a preview can be generated for $path |
|
49 | - * |
|
50 | - * @param \OCP\Files\FileInfo $file |
|
51 | - * @return bool |
|
52 | - */ |
|
53 | - public function isAvailable(\OCP\Files\FileInfo $file) { |
|
54 | - return true; |
|
55 | - } |
|
47 | + /** |
|
48 | + * Check if a preview can be generated for $path |
|
49 | + * |
|
50 | + * @param \OCP\Files\FileInfo $file |
|
51 | + * @return bool |
|
52 | + */ |
|
53 | + public function isAvailable(\OCP\Files\FileInfo $file) { |
|
54 | + return true; |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * Generates thumbnail which fits in $maxX and $maxY and keeps the aspect ratio, for file at path $path |
|
59 | - * |
|
60 | - * @param string $path Path of file |
|
61 | - * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image |
|
62 | - * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image |
|
63 | - * @param bool $scalingup Disable/Enable upscaling of previews |
|
64 | - * @param \OC\Files\View $fileview fileview object of user folder |
|
65 | - * @return bool|\OCP\IImage false if no preview was generated |
|
66 | - */ |
|
67 | - abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview); |
|
57 | + /** |
|
58 | + * Generates thumbnail which fits in $maxX and $maxY and keeps the aspect ratio, for file at path $path |
|
59 | + * |
|
60 | + * @param string $path Path of file |
|
61 | + * @param int $maxX The maximum X size of the thumbnail. It can be smaller depending on the shape of the image |
|
62 | + * @param int $maxY The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image |
|
63 | + * @param bool $scalingup Disable/Enable upscaling of previews |
|
64 | + * @param \OC\Files\View $fileview fileview object of user folder |
|
65 | + * @return bool|\OCP\IImage false if no preview was generated |
|
66 | + */ |
|
67 | + abstract public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview); |
|
68 | 68 | } |
@@ -26,8 +26,8 @@ |
||
26 | 26 | $server = \OC::$server; |
27 | 27 | |
28 | 28 | $controller = new \OC\OCS\Provider( |
29 | - 'ocs_provider', |
|
30 | - $server->getRequest(), |
|
31 | - $server->getAppManager() |
|
29 | + 'ocs_provider', |
|
30 | + $server->getRequest(), |
|
31 | + $server->getAppManager() |
|
32 | 32 | ); |
33 | 33 | echo $controller->buildProviderList()->render(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | // no php execution timeout for webdav |
23 | 23 | if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
24 | - @set_time_limit(0); |
|
24 | + @set_time_limit(0); |
|
25 | 25 | } |
26 | 26 | ignore_user_abort(true); |
27 | 27 |
@@ -7,23 +7,23 @@ |
||
7 | 7 | |
8 | 8 | class RootCollection extends AbstractPrincipalCollection { |
9 | 9 | |
10 | - /** |
|
11 | - * This method returns a node for a principal. |
|
12 | - * |
|
13 | - * The passed array contains principal information, and is guaranteed to |
|
14 | - * at least contain a uri item. Other properties may or may not be |
|
15 | - * supplied by the authentication backend. |
|
16 | - * |
|
17 | - * @param array $principalInfo |
|
18 | - * @return AvatarHome |
|
19 | - */ |
|
20 | - public function getChildForPrincipal(array $principalInfo) { |
|
21 | - $avatarManager = \OC::$server->getAvatarManager(); |
|
22 | - return new AvatarHome($principalInfo, $avatarManager); |
|
23 | - } |
|
10 | + /** |
|
11 | + * This method returns a node for a principal. |
|
12 | + * |
|
13 | + * The passed array contains principal information, and is guaranteed to |
|
14 | + * at least contain a uri item. Other properties may or may not be |
|
15 | + * supplied by the authentication backend. |
|
16 | + * |
|
17 | + * @param array $principalInfo |
|
18 | + * @return AvatarHome |
|
19 | + */ |
|
20 | + public function getChildForPrincipal(array $principalInfo) { |
|
21 | + $avatarManager = \OC::$server->getAvatarManager(); |
|
22 | + return new AvatarHome($principalInfo, $avatarManager); |
|
23 | + } |
|
24 | 24 | |
25 | - public function getName() { |
|
26 | - return 'avatars'; |
|
27 | - } |
|
25 | + public function getName() { |
|
26 | + return 'avatars'; |
|
27 | + } |
|
28 | 28 | |
29 | 29 | } |
@@ -24,56 +24,56 @@ |
||
24 | 24 | use OCP\Lockdown\ILockdownManager; |
25 | 25 | |
26 | 26 | class LockdownManager implements ILockdownManager { |
27 | - /** @var ISession */ |
|
28 | - private $sessionCallback; |
|
27 | + /** @var ISession */ |
|
28 | + private $sessionCallback; |
|
29 | 29 | |
30 | - private $enabled = false; |
|
30 | + private $enabled = false; |
|
31 | 31 | |
32 | - /** @var array|null */ |
|
33 | - private $scope; |
|
32 | + /** @var array|null */ |
|
33 | + private $scope; |
|
34 | 34 | |
35 | - /** |
|
36 | - * LockdownManager constructor. |
|
37 | - * |
|
38 | - * @param callable $sessionCallback we need to inject the session lazily to avoid dependency loops |
|
39 | - */ |
|
40 | - public function __construct(callable $sessionCallback) { |
|
41 | - $this->sessionCallback = $sessionCallback; |
|
42 | - } |
|
35 | + /** |
|
36 | + * LockdownManager constructor. |
|
37 | + * |
|
38 | + * @param callable $sessionCallback we need to inject the session lazily to avoid dependency loops |
|
39 | + */ |
|
40 | + public function __construct(callable $sessionCallback) { |
|
41 | + $this->sessionCallback = $sessionCallback; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | |
45 | - public function enable() { |
|
46 | - $this->enabled = true; |
|
47 | - } |
|
45 | + public function enable() { |
|
46 | + $this->enabled = true; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @return ISession |
|
51 | - */ |
|
52 | - private function getSession() { |
|
53 | - $callback = $this->sessionCallback; |
|
54 | - return $callback(); |
|
55 | - } |
|
49 | + /** |
|
50 | + * @return ISession |
|
51 | + */ |
|
52 | + private function getSession() { |
|
53 | + $callback = $this->sessionCallback; |
|
54 | + return $callback(); |
|
55 | + } |
|
56 | 56 | |
57 | - private function getScopeAsArray() { |
|
58 | - if (!$this->scope) { |
|
59 | - $session = $this->getSession(); |
|
60 | - $sessionScope = $session->get('token_scope'); |
|
61 | - if ($sessionScope) { |
|
62 | - $this->scope = $sessionScope; |
|
63 | - } |
|
64 | - } |
|
65 | - return $this->scope; |
|
66 | - } |
|
57 | + private function getScopeAsArray() { |
|
58 | + if (!$this->scope) { |
|
59 | + $session = $this->getSession(); |
|
60 | + $sessionScope = $session->get('token_scope'); |
|
61 | + if ($sessionScope) { |
|
62 | + $this->scope = $sessionScope; |
|
63 | + } |
|
64 | + } |
|
65 | + return $this->scope; |
|
66 | + } |
|
67 | 67 | |
68 | - public function setToken(IToken $token) { |
|
69 | - $this->scope = $token->getScopeAsArray(); |
|
70 | - $session = $this->getSession(); |
|
71 | - $session->set('token_scope', $this->scope); |
|
72 | - $this->enable(); |
|
73 | - } |
|
68 | + public function setToken(IToken $token) { |
|
69 | + $this->scope = $token->getScopeAsArray(); |
|
70 | + $session = $this->getSession(); |
|
71 | + $session->set('token_scope', $this->scope); |
|
72 | + $this->enable(); |
|
73 | + } |
|
74 | 74 | |
75 | - public function canAccessFilesystem() { |
|
76 | - $scope = $this->getScopeAsArray(); |
|
77 | - return !$scope || $scope['filesystem']; |
|
78 | - } |
|
75 | + public function canAccessFilesystem() { |
|
76 | + $scope = $this->getScopeAsArray(); |
|
77 | + return !$scope || $scope['filesystem']; |
|
78 | + } |
|
79 | 79 | } |
@@ -29,19 +29,19 @@ |
||
29 | 29 | */ |
30 | 30 | class FilesystemHelper { |
31 | 31 | |
32 | - /** |
|
33 | - * @brief states whether the filesystem was loaded |
|
34 | - * @return bool |
|
35 | - */ |
|
36 | - public function isLoaded() { |
|
37 | - return \OC\Files\Filesystem::$loaded; |
|
38 | - } |
|
32 | + /** |
|
33 | + * @brief states whether the filesystem was loaded |
|
34 | + * @return bool |
|
35 | + */ |
|
36 | + public function isLoaded() { |
|
37 | + return \OC\Files\Filesystem::$loaded; |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * @brief initializes the filesystem for the given user |
|
42 | - * @param string $uid the Nextcloud username of the user |
|
43 | - */ |
|
44 | - public function setup($uid) { |
|
45 | - \OC_Util::setupFS($uid); |
|
46 | - } |
|
40 | + /** |
|
41 | + * @brief initializes the filesystem for the given user |
|
42 | + * @param string $uid the Nextcloud username of the user |
|
43 | + */ |
|
44 | + public function setup($uid) { |
|
45 | + \OC_Util::setupFS($uid); |
|
46 | + } |
|
47 | 47 | } |