@@ -27,10 +27,10 @@ |
||
27 | 27 | |
28 | 28 | class EncryptionHeaderKeyExistsException extends GenericEncryptionException { |
29 | 29 | |
30 | - /** |
|
31 | - * @param string $key |
|
32 | - */ |
|
33 | - public function __construct($key) { |
|
34 | - parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
35 | - } |
|
30 | + /** |
|
31 | + * @param string $key |
|
32 | + */ |
|
33 | + public function __construct($key) { |
|
34 | + parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
35 | + } |
|
36 | 36 | } |
@@ -27,50 +27,50 @@ |
||
27 | 27 | use OC\Files\View; |
28 | 28 | |
29 | 29 | class HookManager { |
30 | - /** |
|
31 | - * @var Update |
|
32 | - */ |
|
33 | - private static $updater; |
|
30 | + /** |
|
31 | + * @var Update |
|
32 | + */ |
|
33 | + private static $updater; |
|
34 | 34 | |
35 | - public static function postShared($params) { |
|
36 | - self::getUpdate()->postShared($params); |
|
37 | - } |
|
38 | - public static function postUnshared($params) { |
|
39 | - self::getUpdate()->postUnshared($params); |
|
40 | - } |
|
35 | + public static function postShared($params) { |
|
36 | + self::getUpdate()->postShared($params); |
|
37 | + } |
|
38 | + public static function postUnshared($params) { |
|
39 | + self::getUpdate()->postUnshared($params); |
|
40 | + } |
|
41 | 41 | |
42 | - public static function postRename($params) { |
|
43 | - self::getUpdate()->postRename($params); |
|
44 | - } |
|
42 | + public static function postRename($params) { |
|
43 | + self::getUpdate()->postRename($params); |
|
44 | + } |
|
45 | 45 | |
46 | - public static function postRestore($params) { |
|
47 | - self::getUpdate()->postRestore($params); |
|
48 | - } |
|
46 | + public static function postRestore($params) { |
|
47 | + self::getUpdate()->postRestore($params); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @return Update |
|
52 | - */ |
|
53 | - private static function getUpdate() { |
|
54 | - if (is_null(self::$updater)) { |
|
55 | - $user = \OC::$server->getUserSession()->getUser(); |
|
56 | - $uid = ''; |
|
57 | - if ($user) { |
|
58 | - $uid = $user->getUID(); |
|
59 | - } |
|
60 | - self::$updater = new Update( |
|
61 | - new View(), |
|
62 | - new Util( |
|
63 | - new View(), |
|
64 | - \OC::$server->getUserManager(), |
|
65 | - \OC::$server->getGroupManager(), |
|
66 | - \OC::$server->getConfig()), |
|
67 | - Filesystem::getMountManager(), |
|
68 | - \OC::$server->getEncryptionManager(), |
|
69 | - \OC::$server->getEncryptionFilesHelper(), |
|
70 | - $uid |
|
71 | - ); |
|
72 | - } |
|
50 | + /** |
|
51 | + * @return Update |
|
52 | + */ |
|
53 | + private static function getUpdate() { |
|
54 | + if (is_null(self::$updater)) { |
|
55 | + $user = \OC::$server->getUserSession()->getUser(); |
|
56 | + $uid = ''; |
|
57 | + if ($user) { |
|
58 | + $uid = $user->getUID(); |
|
59 | + } |
|
60 | + self::$updater = new Update( |
|
61 | + new View(), |
|
62 | + new Util( |
|
63 | + new View(), |
|
64 | + \OC::$server->getUserManager(), |
|
65 | + \OC::$server->getGroupManager(), |
|
66 | + \OC::$server->getConfig()), |
|
67 | + Filesystem::getMountManager(), |
|
68 | + \OC::$server->getEncryptionManager(), |
|
69 | + \OC::$server->getEncryptionFilesHelper(), |
|
70 | + $uid |
|
71 | + ); |
|
72 | + } |
|
73 | 73 | |
74 | - return self::$updater; |
|
75 | - } |
|
74 | + return self::$updater; |
|
75 | + } |
|
76 | 76 | } |
@@ -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(); |
@@ -26,53 +26,53 @@ |
||
26 | 26 | |
27 | 27 | abstract class Base extends \OC\Core\Command\Base { |
28 | 28 | |
29 | - /** @var SystemConfig */ |
|
30 | - protected $systemConfig; |
|
29 | + /** @var SystemConfig */ |
|
30 | + protected $systemConfig; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param string $argumentName |
|
34 | - * @param CompletionContext $context |
|
35 | - * @return string[] |
|
36 | - */ |
|
37 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | - if ($argumentName === 'name') { |
|
39 | - $words = $this->getPreviousNames($context, $context->getWordIndex()); |
|
40 | - if (empty($words)) { |
|
41 | - $completions = $this->systemConfig->getKeys(); |
|
42 | - } else { |
|
43 | - $key = array_shift($words); |
|
44 | - $value = $this->systemConfig->getValue($key); |
|
45 | - $completions = array_keys($value); |
|
32 | + /** |
|
33 | + * @param string $argumentName |
|
34 | + * @param CompletionContext $context |
|
35 | + * @return string[] |
|
36 | + */ |
|
37 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | + if ($argumentName === 'name') { |
|
39 | + $words = $this->getPreviousNames($context, $context->getWordIndex()); |
|
40 | + if (empty($words)) { |
|
41 | + $completions = $this->systemConfig->getKeys(); |
|
42 | + } else { |
|
43 | + $key = array_shift($words); |
|
44 | + $value = $this->systemConfig->getValue($key); |
|
45 | + $completions = array_keys($value); |
|
46 | 46 | |
47 | - while (!empty($words) && is_array($value)) { |
|
48 | - $key = array_shift($words); |
|
49 | - if (!isset($value[$key]) || !is_array($value[$key])) { |
|
50 | - break; |
|
51 | - } |
|
47 | + while (!empty($words) && is_array($value)) { |
|
48 | + $key = array_shift($words); |
|
49 | + if (!isset($value[$key]) || !is_array($value[$key])) { |
|
50 | + break; |
|
51 | + } |
|
52 | 52 | |
53 | - $value = $value[$key]; |
|
54 | - $completions = array_keys($value); |
|
55 | - } |
|
56 | - } |
|
53 | + $value = $value[$key]; |
|
54 | + $completions = array_keys($value); |
|
55 | + } |
|
56 | + } |
|
57 | 57 | |
58 | - return $completions; |
|
59 | - } |
|
60 | - return parent::completeArgumentValues($argumentName, $context); |
|
61 | - } |
|
58 | + return $completions; |
|
59 | + } |
|
60 | + return parent::completeArgumentValues($argumentName, $context); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @param CompletionContext $context |
|
65 | - * @param int $currentIndex |
|
66 | - * @return string[] |
|
67 | - */ |
|
68 | - protected function getPreviousNames(CompletionContext $context, $currentIndex) { |
|
69 | - $word = $context->getWordAtIndex($currentIndex - 1); |
|
70 | - if ($word === $this->getName() || $currentIndex <= 0) { |
|
71 | - return []; |
|
72 | - } |
|
63 | + /** |
|
64 | + * @param CompletionContext $context |
|
65 | + * @param int $currentIndex |
|
66 | + * @return string[] |
|
67 | + */ |
|
68 | + protected function getPreviousNames(CompletionContext $context, $currentIndex) { |
|
69 | + $word = $context->getWordAtIndex($currentIndex - 1); |
|
70 | + if ($word === $this->getName() || $currentIndex <= 0) { |
|
71 | + return []; |
|
72 | + } |
|
73 | 73 | |
74 | - $words = $this->getPreviousNames($context, $currentIndex - 1); |
|
75 | - $words[] = $word; |
|
76 | - return $words; |
|
77 | - } |
|
74 | + $words = $this->getPreviousNames($context, $currentIndex - 1); |
|
75 | + $words[] = $word; |
|
76 | + return $words; |
|
77 | + } |
|
78 | 78 | } |
@@ -26,23 +26,23 @@ |
||
26 | 26 | |
27 | 27 | abstract class Base extends \OC\Core\Command\Base { |
28 | 28 | |
29 | - /** * @var IConfig */ |
|
30 | - protected $config; |
|
29 | + /** * @var IConfig */ |
|
30 | + protected $config; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param string $argumentName |
|
34 | - * @param CompletionContext $context |
|
35 | - * @return string[] |
|
36 | - */ |
|
37 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | - if ($argumentName === 'app') { |
|
39 | - return \OC_App::getAllApps(); |
|
40 | - } |
|
32 | + /** |
|
33 | + * @param string $argumentName |
|
34 | + * @param CompletionContext $context |
|
35 | + * @return string[] |
|
36 | + */ |
|
37 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
38 | + if ($argumentName === 'app') { |
|
39 | + return \OC_App::getAllApps(); |
|
40 | + } |
|
41 | 41 | |
42 | - if ($argumentName === 'name') { |
|
43 | - $appName = $context->getWordAtIndex($context->getWordIndex() - 1); |
|
44 | - return $this->config->getAppKeys($appName); |
|
45 | - } |
|
46 | - return []; |
|
47 | - } |
|
42 | + if ($argumentName === 'name') { |
|
43 | + $appName = $context->getWordAtIndex($context->getWordIndex() - 1); |
|
44 | + return $this->config->getAppKeys($appName); |
|
45 | + } |
|
46 | + return []; |
|
47 | + } |
|
48 | 48 | } |
@@ -24,44 +24,44 @@ |
||
24 | 24 | use OCP\Files\Search\ISearchComparison; |
25 | 25 | |
26 | 26 | class SearchComparison implements ISearchComparison { |
27 | - /** @var string */ |
|
28 | - private $type; |
|
29 | - /** @var string */ |
|
30 | - private $field; |
|
31 | - /** @var string|integer|\DateTime */ |
|
32 | - private $value; |
|
27 | + /** @var string */ |
|
28 | + private $type; |
|
29 | + /** @var string */ |
|
30 | + private $field; |
|
31 | + /** @var string|integer|\DateTime */ |
|
32 | + private $value; |
|
33 | 33 | |
34 | - /** |
|
35 | - * SearchComparison constructor. |
|
36 | - * |
|
37 | - * @param string $type |
|
38 | - * @param string $field |
|
39 | - * @param \DateTime|int|string $value |
|
40 | - */ |
|
41 | - public function __construct($type, $field, $value) { |
|
42 | - $this->type = $type; |
|
43 | - $this->field = $field; |
|
44 | - $this->value = $value; |
|
45 | - } |
|
34 | + /** |
|
35 | + * SearchComparison constructor. |
|
36 | + * |
|
37 | + * @param string $type |
|
38 | + * @param string $field |
|
39 | + * @param \DateTime|int|string $value |
|
40 | + */ |
|
41 | + public function __construct($type, $field, $value) { |
|
42 | + $this->type = $type; |
|
43 | + $this->field = $field; |
|
44 | + $this->value = $value; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - */ |
|
50 | - public function getType() { |
|
51 | - return $this->type; |
|
52 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + */ |
|
50 | + public function getType() { |
|
51 | + return $this->type; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * @return string |
|
56 | - */ |
|
57 | - public function getField() { |
|
58 | - return $this->field; |
|
59 | - } |
|
54 | + /** |
|
55 | + * @return string |
|
56 | + */ |
|
57 | + public function getField() { |
|
58 | + return $this->field; |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @return \DateTime|int|string |
|
63 | - */ |
|
64 | - public function getValue() { |
|
65 | - return $this->value; |
|
66 | - } |
|
61 | + /** |
|
62 | + * @return \DateTime|int|string |
|
63 | + */ |
|
64 | + public function getValue() { |
|
65 | + return $this->value; |
|
66 | + } |
|
67 | 67 | } |
@@ -25,33 +25,33 @@ |
||
25 | 25 | use OCP\Files\Search\ISearchOrder; |
26 | 26 | |
27 | 27 | class SearchOrder implements ISearchOrder { |
28 | - /** @var string */ |
|
29 | - private $direction; |
|
30 | - /** @var string */ |
|
31 | - private $field; |
|
28 | + /** @var string */ |
|
29 | + private $direction; |
|
30 | + /** @var string */ |
|
31 | + private $field; |
|
32 | 32 | |
33 | - /** |
|
34 | - * SearchOrder constructor. |
|
35 | - * |
|
36 | - * @param string $direction |
|
37 | - * @param string $field |
|
38 | - */ |
|
39 | - public function __construct($direction, $field) { |
|
40 | - $this->direction = $direction; |
|
41 | - $this->field = $field; |
|
42 | - } |
|
33 | + /** |
|
34 | + * SearchOrder constructor. |
|
35 | + * |
|
36 | + * @param string $direction |
|
37 | + * @param string $field |
|
38 | + */ |
|
39 | + public function __construct($direction, $field) { |
|
40 | + $this->direction = $direction; |
|
41 | + $this->field = $field; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return string |
|
46 | - */ |
|
47 | - public function getDirection() { |
|
48 | - return $this->direction; |
|
49 | - } |
|
44 | + /** |
|
45 | + * @return string |
|
46 | + */ |
|
47 | + public function getDirection() { |
|
48 | + return $this->direction; |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * @return string |
|
53 | - */ |
|
54 | - public function getField() { |
|
55 | - return $this->field; |
|
56 | - } |
|
51 | + /** |
|
52 | + * @return string |
|
53 | + */ |
|
54 | + public function getField() { |
|
55 | + return $this->field; |
|
56 | + } |
|
57 | 57 | } |
@@ -25,33 +25,33 @@ |
||
25 | 25 | use OCP\Files\Search\ISearchOperator; |
26 | 26 | |
27 | 27 | class SearchBinaryOperator implements ISearchBinaryOperator { |
28 | - /** @var string */ |
|
29 | - private $type; |
|
30 | - /** @var ISearchOperator[] */ |
|
31 | - private $arguments; |
|
28 | + /** @var string */ |
|
29 | + private $type; |
|
30 | + /** @var ISearchOperator[] */ |
|
31 | + private $arguments; |
|
32 | 32 | |
33 | - /** |
|
34 | - * SearchBinaryOperator constructor. |
|
35 | - * |
|
36 | - * @param string $type |
|
37 | - * @param ISearchOperator[] $arguments |
|
38 | - */ |
|
39 | - public function __construct($type, array $arguments) { |
|
40 | - $this->type = $type; |
|
41 | - $this->arguments = $arguments; |
|
42 | - } |
|
33 | + /** |
|
34 | + * SearchBinaryOperator constructor. |
|
35 | + * |
|
36 | + * @param string $type |
|
37 | + * @param ISearchOperator[] $arguments |
|
38 | + */ |
|
39 | + public function __construct($type, array $arguments) { |
|
40 | + $this->type = $type; |
|
41 | + $this->arguments = $arguments; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return string |
|
46 | - */ |
|
47 | - public function getType() { |
|
48 | - return $this->type; |
|
49 | - } |
|
44 | + /** |
|
45 | + * @return string |
|
46 | + */ |
|
47 | + public function getType() { |
|
48 | + return $this->type; |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * @return ISearchOperator[] |
|
53 | - */ |
|
54 | - public function getArguments() { |
|
55 | - return $this->arguments; |
|
56 | - } |
|
51 | + /** |
|
52 | + * @return ISearchOperator[] |
|
53 | + */ |
|
54 | + public function getArguments() { |
|
55 | + return $this->arguments; |
|
56 | + } |
|
57 | 57 | } |
@@ -23,18 +23,18 @@ |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | return [ |
26 | - 'routes' => [ |
|
27 | - ['name' => 'MountPublicLink#createFederatedShare', 'url' => '/createFederatedShare', 'verb' => 'POST'], |
|
28 | - ['name' => 'MountPublicLink#askForFederatedShare', 'url' => '/askForFederatedShare', 'verb' => 'POST'], |
|
29 | - ], |
|
30 | - 'ocs' => [ |
|
31 | - ['root' => '/cloud', 'name' => 'RequestHandler#createShare', 'url' => '/shares', 'verb' => 'POST'], |
|
32 | - ['root' => '/cloud', 'name' => 'RequestHandler#reShare', 'url' => '/shares/{id}/reshare', 'verb' => 'POST'], |
|
33 | - ['root' => '/cloud', 'name' => 'RequestHandler#updatePermissions', 'url' => '/shares/{id}/permissions', 'verb' => 'POST'], |
|
34 | - ['root' => '/cloud', 'name' => 'RequestHandler#acceptShare', 'url' => '/shares/{id}/accept', 'verb' => 'POST'], |
|
35 | - ['root' => '/cloud', 'name' => 'RequestHandler#declineShare', 'url' => '/shares/{id}/decline', 'verb' => 'POST'], |
|
36 | - ['root' => '/cloud', 'name' => 'RequestHandler#unshare', 'url' => '/shares/{id}/unshare', 'verb' => 'POST'], |
|
37 | - ['root' => '/cloud', 'name' => 'RequestHandler#revoke', 'url' => '/shares/{id}/revoke', 'verb' => 'POST'], |
|
38 | - ['root' => '/cloud', 'name' => 'RequestHandler#move', 'url' => '/shares/{id}/move', 'verb' => 'POST'], |
|
39 | - ], |
|
26 | + 'routes' => [ |
|
27 | + ['name' => 'MountPublicLink#createFederatedShare', 'url' => '/createFederatedShare', 'verb' => 'POST'], |
|
28 | + ['name' => 'MountPublicLink#askForFederatedShare', 'url' => '/askForFederatedShare', 'verb' => 'POST'], |
|
29 | + ], |
|
30 | + 'ocs' => [ |
|
31 | + ['root' => '/cloud', 'name' => 'RequestHandler#createShare', 'url' => '/shares', 'verb' => 'POST'], |
|
32 | + ['root' => '/cloud', 'name' => 'RequestHandler#reShare', 'url' => '/shares/{id}/reshare', 'verb' => 'POST'], |
|
33 | + ['root' => '/cloud', 'name' => 'RequestHandler#updatePermissions', 'url' => '/shares/{id}/permissions', 'verb' => 'POST'], |
|
34 | + ['root' => '/cloud', 'name' => 'RequestHandler#acceptShare', 'url' => '/shares/{id}/accept', 'verb' => 'POST'], |
|
35 | + ['root' => '/cloud', 'name' => 'RequestHandler#declineShare', 'url' => '/shares/{id}/decline', 'verb' => 'POST'], |
|
36 | + ['root' => '/cloud', 'name' => 'RequestHandler#unshare', 'url' => '/shares/{id}/unshare', 'verb' => 'POST'], |
|
37 | + ['root' => '/cloud', 'name' => 'RequestHandler#revoke', 'url' => '/shares/{id}/revoke', 'verb' => 'POST'], |
|
38 | + ['root' => '/cloud', 'name' => 'RequestHandler#move', 'url' => '/shares/{id}/move', 'verb' => 'POST'], |
|
39 | + ], |
|
40 | 40 | ]; |