@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function completeArgumentValues($argumentName, CompletionContext $context) { |
53 | 53 | if ($argumentName === 'uid') { |
54 | - return array_map(function (IUser $user) { |
|
54 | + return array_map(function(IUser $user) { |
|
55 | 55 | return $user->getUID(); |
56 | 56 | }, $this->userManager->search($context->getCurrentWord(), 100)); |
57 | 57 | } |
@@ -10,37 +10,37 @@ |
||
10 | 10 | use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; |
11 | 11 | |
12 | 12 | class Base extends \OC\Core\Command\Base { |
13 | - public function __construct( |
|
14 | - ?string $name, |
|
15 | - protected IUserManager $userManager, |
|
16 | - ) { |
|
17 | - parent::__construct($name); |
|
18 | - } |
|
13 | + public function __construct( |
|
14 | + ?string $name, |
|
15 | + protected IUserManager $userManager, |
|
16 | + ) { |
|
17 | + parent::__construct($name); |
|
18 | + } |
|
19 | 19 | |
20 | - /** |
|
21 | - * Return possible values for the named option |
|
22 | - * |
|
23 | - * @param string $optionName |
|
24 | - * @param CompletionContext $context |
|
25 | - * @return string[] |
|
26 | - */ |
|
27 | - public function completeOptionValues($optionName, CompletionContext $context) { |
|
28 | - return []; |
|
29 | - } |
|
20 | + /** |
|
21 | + * Return possible values for the named option |
|
22 | + * |
|
23 | + * @param string $optionName |
|
24 | + * @param CompletionContext $context |
|
25 | + * @return string[] |
|
26 | + */ |
|
27 | + public function completeOptionValues($optionName, CompletionContext $context) { |
|
28 | + return []; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * Return possible values for the named argument |
|
33 | - * |
|
34 | - * @param string $argumentName |
|
35 | - * @param CompletionContext $context |
|
36 | - * @return string[] |
|
37 | - */ |
|
38 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
39 | - if ($argumentName === 'uid') { |
|
40 | - return array_map(function (IUser $user) { |
|
41 | - return $user->getUID(); |
|
42 | - }, $this->userManager->search($context->getCurrentWord(), 100)); |
|
43 | - } |
|
44 | - return []; |
|
45 | - } |
|
31 | + /** |
|
32 | + * Return possible values for the named argument |
|
33 | + * |
|
34 | + * @param string $argumentName |
|
35 | + * @param CompletionContext $context |
|
36 | + * @return string[] |
|
37 | + */ |
|
38 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
39 | + if ($argumentName === 'uid') { |
|
40 | + return array_map(function (IUser $user) { |
|
41 | + return $user->getUID(); |
|
42 | + }, $this->userManager->search($context->getCurrentWord(), 100)); |
|
43 | + } |
|
44 | + return []; |
|
45 | + } |
|
46 | 46 | } |
@@ -67,11 +67,11 @@ |
||
67 | 67 | */ |
68 | 68 | protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { |
69 | 69 | if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
70 | - array_walk($items, function (&$item) { |
|
70 | + array_walk($items, function(&$item) { |
|
71 | 71 | if (!$item['default']) { |
72 | 72 | $item = $item['displayName']; |
73 | 73 | } else { |
74 | - $item = $item['displayName'] . ' [default*]'; |
|
74 | + $item = $item['displayName'].' [default*]'; |
|
75 | 75 | } |
76 | 76 | }); |
77 | 77 | } |
@@ -14,58 +14,58 @@ |
||
14 | 14 | use Symfony\Component\Console\Output\OutputInterface; |
15 | 15 | |
16 | 16 | class ListModules extends Base { |
17 | - public function __construct( |
|
18 | - protected IManager $encryptionManager, |
|
19 | - protected IConfig $config, |
|
20 | - ) { |
|
21 | - parent::__construct(); |
|
22 | - } |
|
17 | + public function __construct( |
|
18 | + protected IManager $encryptionManager, |
|
19 | + protected IConfig $config, |
|
20 | + ) { |
|
21 | + parent::__construct(); |
|
22 | + } |
|
23 | 23 | |
24 | - protected function configure() { |
|
25 | - parent::configure(); |
|
24 | + protected function configure() { |
|
25 | + parent::configure(); |
|
26 | 26 | |
27 | - $this |
|
28 | - ->setName('encryption:list-modules') |
|
29 | - ->setDescription('List all available encryption modules') |
|
30 | - ; |
|
31 | - } |
|
27 | + $this |
|
28 | + ->setName('encryption:list-modules') |
|
29 | + ->setDescription('List all available encryption modules') |
|
30 | + ; |
|
31 | + } |
|
32 | 32 | |
33 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
34 | - $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); |
|
35 | - if ($isMaintenanceModeEnabled) { |
|
36 | - $output->writeln('Maintenance mode must be disabled when listing modules'); |
|
37 | - $output->writeln('in order to list the relevant encryption modules correctly.'); |
|
38 | - return 1; |
|
39 | - } |
|
33 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
34 | + $isMaintenanceModeEnabled = $this->config->getSystemValue('maintenance', false); |
|
35 | + if ($isMaintenanceModeEnabled) { |
|
36 | + $output->writeln('Maintenance mode must be disabled when listing modules'); |
|
37 | + $output->writeln('in order to list the relevant encryption modules correctly.'); |
|
38 | + return 1; |
|
39 | + } |
|
40 | 40 | |
41 | - $encryptionModules = $this->encryptionManager->getEncryptionModules(); |
|
42 | - $defaultEncryptionModuleId = $this->encryptionManager->getDefaultEncryptionModuleId(); |
|
41 | + $encryptionModules = $this->encryptionManager->getEncryptionModules(); |
|
42 | + $defaultEncryptionModuleId = $this->encryptionManager->getDefaultEncryptionModuleId(); |
|
43 | 43 | |
44 | - $encModules = []; |
|
45 | - foreach ($encryptionModules as $module) { |
|
46 | - $encModules[$module['id']]['displayName'] = $module['displayName']; |
|
47 | - $encModules[$module['id']]['default'] = $module['id'] === $defaultEncryptionModuleId; |
|
48 | - } |
|
49 | - $this->writeModuleList($input, $output, $encModules); |
|
50 | - return 0; |
|
51 | - } |
|
44 | + $encModules = []; |
|
45 | + foreach ($encryptionModules as $module) { |
|
46 | + $encModules[$module['id']]['displayName'] = $module['displayName']; |
|
47 | + $encModules[$module['id']]['default'] = $module['id'] === $defaultEncryptionModuleId; |
|
48 | + } |
|
49 | + $this->writeModuleList($input, $output, $encModules); |
|
50 | + return 0; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @param InputInterface $input |
|
55 | - * @param OutputInterface $output |
|
56 | - * @param array $items |
|
57 | - */ |
|
58 | - protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { |
|
59 | - if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
|
60 | - array_walk($items, function (&$item) { |
|
61 | - if (!$item['default']) { |
|
62 | - $item = $item['displayName']; |
|
63 | - } else { |
|
64 | - $item = $item['displayName'] . ' [default*]'; |
|
65 | - } |
|
66 | - }); |
|
67 | - } |
|
53 | + /** |
|
54 | + * @param InputInterface $input |
|
55 | + * @param OutputInterface $output |
|
56 | + * @param array $items |
|
57 | + */ |
|
58 | + protected function writeModuleList(InputInterface $input, OutputInterface $output, $items) { |
|
59 | + if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
|
60 | + array_walk($items, function (&$item) { |
|
61 | + if (!$item['default']) { |
|
62 | + $item = $item['displayName']; |
|
63 | + } else { |
|
64 | + $item = $item['displayName'] . ' [default*]'; |
|
65 | + } |
|
66 | + }); |
|
67 | + } |
|
68 | 68 | |
69 | - $this->writeArrayInOutputFormat($input, $output, $items); |
|
70 | - } |
|
69 | + $this->writeArrayInOutputFormat($input, $output, $items); |
|
70 | + } |
|
71 | 71 | } |
@@ -16,8 +16,11 @@ |
||
16 | 16 | <?php if ($error): ?> |
17 | 17 | <?php if ($error_message): ?> |
18 | 18 | <p><strong><?php p($error_message); ?></strong></p> |
19 | - <?php else: ?> |
|
20 | - <p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p> |
|
19 | + <?php else { |
|
20 | + : ?> |
|
21 | + <p><strong><?php p($l->t('Error while validating your second factor')); |
|
22 | +} |
|
23 | +?></strong></p> |
|
21 | 24 | <?php endif; ?> |
22 | 25 | <?php endif; ?> |
23 | 26 | <?php print_unescaped($template); ?> |
@@ -24,11 +24,11 @@ |
||
24 | 24 | <?php if (!is_null($_['backupProvider'])): ?> |
25 | 25 | <p> |
26 | 26 | <a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
27 | - [ |
|
28 | - 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | - 'redirect_url' => $_['redirect_url'], |
|
30 | - ] |
|
31 | - )) ?>"> |
|
27 | + [ |
|
28 | + 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | + 'redirect_url' => $_['redirect_url'], |
|
30 | + ] |
|
31 | + )) ?>"> |
|
32 | 32 | <?php p($l->t('Use backup code')) ?> |
33 | 33 | </a> |
34 | 34 | </p> |
@@ -27,18 +27,18 @@ |
||
27 | 27 | */ |
28 | 28 | class InvalidAuth extends AuthMechanism { |
29 | 29 | |
30 | - /** |
|
31 | - * Constructs a new InvalidAuth with the id of the invalid auth |
|
32 | - * for display purposes |
|
33 | - * |
|
34 | - * @param string $invalidId invalid id |
|
35 | - */ |
|
36 | - public function __construct($invalidId) { |
|
37 | - $this |
|
38 | - ->setIdentifier($invalidId) |
|
39 | - ->setScheme(self::SCHEME_NULL) |
|
40 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | - ; |
|
42 | - } |
|
30 | + /** |
|
31 | + * Constructs a new InvalidAuth with the id of the invalid auth |
|
32 | + * for display purposes |
|
33 | + * |
|
34 | + * @param string $invalidId invalid id |
|
35 | + */ |
|
36 | + public function __construct($invalidId) { |
|
37 | + $this |
|
38 | + ->setIdentifier($invalidId) |
|
39 | + ->setScheme(self::SCHEME_NULL) |
|
40 | + ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | + ; |
|
42 | + } |
|
43 | 43 | |
44 | 44 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this |
39 | 39 | ->setIdentifier($invalidId) |
40 | 40 | ->setScheme(self::SCHEME_NULL) |
41 | - ->setText('Unknown auth mechanism backend ' . $invalidId) |
|
41 | + ->setText('Unknown auth mechanism backend '.$invalidId) |
|
42 | 42 | ; |
43 | 43 | } |
44 | 44 | } |
@@ -30,13 +30,13 @@ |
||
30 | 30 | * @since 13.0.0 |
31 | 31 | */ |
32 | 32 | interface ISearchPlugin { |
33 | - /** |
|
34 | - * @param string $search |
|
35 | - * @param int $limit |
|
36 | - * @param int $offset |
|
37 | - * @param ISearchResult $searchResult |
|
38 | - * @return bool whether the plugin has more results |
|
39 | - * @since 13.0.0 |
|
40 | - */ |
|
41 | - public function search($search, $limit, $offset, ISearchResult $searchResult); |
|
33 | + /** |
|
34 | + * @param string $search |
|
35 | + * @param int $limit |
|
36 | + * @param int $offset |
|
37 | + * @param ISearchResult $searchResult |
|
38 | + * @return bool whether the plugin has more results |
|
39 | + * @since 13.0.0 |
|
40 | + */ |
|
41 | + public function search($search, $limit, $offset, ISearchResult $searchResult); |
|
42 | 42 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @package OC\AppFramework\Middleware\Security\Exceptions |
33 | 33 | */ |
34 | 34 | class LaxSameSiteCookieFailedException extends SecurityException { |
35 | - public function __construct() { |
|
36 | - parent::__construct('Lax Same Site Cookie is invalid in request.', Http::STATUS_PRECONDITION_FAILED); |
|
37 | - } |
|
35 | + public function __construct() { |
|
36 | + parent::__construct('Lax Same Site Cookie is invalid in request.', Http::STATUS_PRECONDITION_FAILED); |
|
37 | + } |
|
38 | 38 | } |
@@ -25,31 +25,31 @@ |
||
25 | 25 | use OCP\Remote\ICredentials; |
26 | 26 | |
27 | 27 | class Credentials implements ICredentials { |
28 | - /** @var string */ |
|
29 | - private $user; |
|
30 | - /** @var string */ |
|
31 | - private $password; |
|
28 | + /** @var string */ |
|
29 | + private $user; |
|
30 | + /** @var string */ |
|
31 | + private $password; |
|
32 | 32 | |
33 | - /** |
|
34 | - * @param string $user |
|
35 | - * @param string $password |
|
36 | - */ |
|
37 | - public function __construct($user, $password) { |
|
38 | - $this->user = $user; |
|
39 | - $this->password = $password; |
|
40 | - } |
|
33 | + /** |
|
34 | + * @param string $user |
|
35 | + * @param string $password |
|
36 | + */ |
|
37 | + public function __construct($user, $password) { |
|
38 | + $this->user = $user; |
|
39 | + $this->password = $password; |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * @return string |
|
44 | - */ |
|
45 | - public function getUsername() { |
|
46 | - return $this->user; |
|
47 | - } |
|
42 | + /** |
|
43 | + * @return string |
|
44 | + */ |
|
45 | + public function getUsername() { |
|
46 | + return $this->user; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @return string |
|
51 | - */ |
|
52 | - public function getPassword() { |
|
53 | - return $this->password; |
|
54 | - } |
|
49 | + /** |
|
50 | + * @return string |
|
51 | + */ |
|
52 | + public function getPassword() { |
|
53 | + return $this->password; |
|
54 | + } |
|
55 | 55 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files_Sharing\\' => array($baseDir . '/../lib'), |
|
9 | + 'OCA\\Files_Sharing\\' => array($baseDir.'/../lib'), |
|
10 | 10 | ); |
@@ -6,5 +6,5 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\AdminAudit\\' => array($baseDir . '/../lib'), |
|
9 | + 'OCA\\AdminAudit\\' => array($baseDir.'/../lib'), |
|
10 | 10 | ); |