@@ -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 | } |
@@ -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 | } |
@@ -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 | |
@@ -37,57 +37,57 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | class ConsoleOutput implements IOutput { |
| 39 | 39 | |
| 40 | - /** @var OutputInterface */ |
|
| 41 | - private $output; |
|
| 40 | + /** @var OutputInterface */ |
|
| 41 | + private $output; |
|
| 42 | 42 | |
| 43 | - /** @var ProgressBar */ |
|
| 44 | - private $progressBar; |
|
| 43 | + /** @var ProgressBar */ |
|
| 44 | + private $progressBar; |
|
| 45 | 45 | |
| 46 | - public function __construct(OutputInterface $output) { |
|
| 47 | - $this->output = $output; |
|
| 48 | - } |
|
| 46 | + public function __construct(OutputInterface $output) { |
|
| 47 | + $this->output = $output; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @param string $message |
|
| 52 | - */ |
|
| 53 | - public function info($message) { |
|
| 54 | - $this->output->writeln("<info>$message</info>"); |
|
| 55 | - } |
|
| 50 | + /** |
|
| 51 | + * @param string $message |
|
| 52 | + */ |
|
| 53 | + public function info($message) { |
|
| 54 | + $this->output->writeln("<info>$message</info>"); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @param string $message |
|
| 59 | - */ |
|
| 60 | - public function warning($message) { |
|
| 61 | - $this->output->writeln("<comment>$message</comment>"); |
|
| 62 | - } |
|
| 57 | + /** |
|
| 58 | + * @param string $message |
|
| 59 | + */ |
|
| 60 | + public function warning($message) { |
|
| 61 | + $this->output->writeln("<comment>$message</comment>"); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @param int $max |
|
| 66 | - */ |
|
| 67 | - public function startProgress($max = 0) { |
|
| 68 | - if (!is_null($this->progressBar)) { |
|
| 69 | - $this->progressBar->finish(); |
|
| 70 | - } |
|
| 71 | - $this->progressBar = new ProgressBar($this->output); |
|
| 72 | - $this->progressBar->start($max); |
|
| 73 | - } |
|
| 64 | + /** |
|
| 65 | + * @param int $max |
|
| 66 | + */ |
|
| 67 | + public function startProgress($max = 0) { |
|
| 68 | + if (!is_null($this->progressBar)) { |
|
| 69 | + $this->progressBar->finish(); |
|
| 70 | + } |
|
| 71 | + $this->progressBar = new ProgressBar($this->output); |
|
| 72 | + $this->progressBar->start($max); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * @param int $step |
|
| 77 | - * @param string $description |
|
| 78 | - */ |
|
| 79 | - public function advance($step = 1, $description = '') { |
|
| 80 | - if (!is_null($this->progressBar)) { |
|
| 81 | - $this->progressBar = new ProgressBar($this->output); |
|
| 82 | - $this->progressBar->start(); |
|
| 83 | - } |
|
| 84 | - $this->progressBar->advance($step); |
|
| 85 | - } |
|
| 75 | + /** |
|
| 76 | + * @param int $step |
|
| 77 | + * @param string $description |
|
| 78 | + */ |
|
| 79 | + public function advance($step = 1, $description = '') { |
|
| 80 | + if (!is_null($this->progressBar)) { |
|
| 81 | + $this->progressBar = new ProgressBar($this->output); |
|
| 82 | + $this->progressBar->start(); |
|
| 83 | + } |
|
| 84 | + $this->progressBar->advance($step); |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - public function finishProgress() { |
|
| 88 | - if (is_null($this->progressBar)) { |
|
| 89 | - return; |
|
| 90 | - } |
|
| 91 | - $this->progressBar->finish(); |
|
| 92 | - } |
|
| 87 | + public function finishProgress() { |
|
| 88 | + if (is_null($this->progressBar)) { |
|
| 89 | + return; |
|
| 90 | + } |
|
| 91 | + $this->progressBar->finish(); |
|
| 92 | + } |
|
| 93 | 93 | } |
@@ -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,10 +29,10 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | interface IProvider { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @since 12.0 |
|
| 34 | - * @param IEntry $entry |
|
| 35 | - * @return void |
|
| 36 | - */ |
|
| 37 | - public function process(IEntry $entry); |
|
| 32 | + /** |
|
| 33 | + * @since 12.0 |
|
| 34 | + * @param IEntry $entry |
|
| 35 | + * @return void |
|
| 36 | + */ |
|
| 37 | + public function process(IEntry $entry); |
|
| 38 | 38 | } |