@@ -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 | } |
@@ -33,33 +33,33 @@ |
||
33 | 33 | */ |
34 | 34 | interface IAction extends JsonSerializable { |
35 | 35 | |
36 | - /** |
|
37 | - * @param string $icon absolute URI to an icon |
|
38 | - * @since 12.0 |
|
39 | - */ |
|
40 | - public function setIcon($icon); |
|
36 | + /** |
|
37 | + * @param string $icon absolute URI to an icon |
|
38 | + * @since 12.0 |
|
39 | + */ |
|
40 | + public function setIcon($icon); |
|
41 | 41 | |
42 | - /** |
|
43 | - * @return string localized action name, e.g. 'Call' |
|
44 | - * @since 12.0 |
|
45 | - */ |
|
46 | - public function getName(); |
|
42 | + /** |
|
43 | + * @return string localized action name, e.g. 'Call' |
|
44 | + * @since 12.0 |
|
45 | + */ |
|
46 | + public function getName(); |
|
47 | 47 | |
48 | - /** |
|
49 | - * @param string $name localized action name, e.g. 'Call' |
|
50 | - * @since 12.0 |
|
51 | - */ |
|
52 | - public function setName($name); |
|
48 | + /** |
|
49 | + * @param string $name localized action name, e.g. 'Call' |
|
50 | + * @since 12.0 |
|
51 | + */ |
|
52 | + public function setName($name); |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param int $priority priorize actions, high order ones are shown on top |
|
56 | - * @since 12.0 |
|
57 | - */ |
|
58 | - public function setPriority($priority); |
|
54 | + /** |
|
55 | + * @param int $priority priorize actions, high order ones are shown on top |
|
56 | + * @since 12.0 |
|
57 | + */ |
|
58 | + public function setPriority($priority); |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return int priority to priorize actions, high order ones are shown on top |
|
62 | - * @since 12.0 |
|
63 | - */ |
|
64 | - public function getPriority(); |
|
60 | + /** |
|
61 | + * @return int priority to priorize actions, high order ones are shown on top |
|
62 | + * @since 12.0 |
|
63 | + */ |
|
64 | + public function getPriority(); |
|
65 | 65 | } |
@@ -28,27 +28,27 @@ |
||
28 | 28 | */ |
29 | 29 | interface IActionFactory { |
30 | 30 | |
31 | - /** |
|
32 | - * Construct and return a new link action for the contacts menu |
|
33 | - * |
|
34 | - * @since 12.0 |
|
35 | - * |
|
36 | - * @param string $icon full path to the action's icon |
|
37 | - * @param string $name localized name of the action |
|
38 | - * @param string $href target URL |
|
39 | - * @return ILinkAction |
|
40 | - */ |
|
41 | - public function newLinkAction($icon, $name, $href); |
|
31 | + /** |
|
32 | + * Construct and return a new link action for the contacts menu |
|
33 | + * |
|
34 | + * @since 12.0 |
|
35 | + * |
|
36 | + * @param string $icon full path to the action's icon |
|
37 | + * @param string $name localized name of the action |
|
38 | + * @param string $href target URL |
|
39 | + * @return ILinkAction |
|
40 | + */ |
|
41 | + public function newLinkAction($icon, $name, $href); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Construct and return a new email action for the contacts menu |
|
45 | - * |
|
46 | - * @since 12.0 |
|
47 | - * |
|
48 | - * @param string $icon full path to the action's icon |
|
49 | - * @param string $name localized name of the action |
|
50 | - * @param string $email target e-mail address |
|
51 | - * @return ILinkAction |
|
52 | - */ |
|
53 | - public function newEMailAction($icon, $name, $email); |
|
43 | + /** |
|
44 | + * Construct and return a new email action for the contacts menu |
|
45 | + * |
|
46 | + * @since 12.0 |
|
47 | + * |
|
48 | + * @param string $icon full path to the action's icon |
|
49 | + * @param string $name localized name of the action |
|
50 | + * @param string $email target e-mail address |
|
51 | + * @return ILinkAction |
|
52 | + */ |
|
53 | + public function newEMailAction($icon, $name, $email); |
|
54 | 54 | } |
@@ -29,15 +29,15 @@ |
||
29 | 29 | */ |
30 | 30 | interface ILinkAction extends IAction { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 12.0 |
|
34 | - * @param string $href the target URL of the action |
|
35 | - */ |
|
36 | - public function setHref($href); |
|
32 | + /** |
|
33 | + * @since 12.0 |
|
34 | + * @param string $href the target URL of the action |
|
35 | + */ |
|
36 | + public function setHref($href); |
|
37 | 37 | |
38 | - /** |
|
39 | - * @since 12.0 |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getHref(); |
|
38 | + /** |
|
39 | + * @since 12.0 |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getHref(); |
|
43 | 43 | } |
@@ -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 | ]; |