@@ -30,65 +30,65 @@ |
||
30 | 30 | |
31 | 31 | class Calendar implements IFilter { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - protected $l; |
|
33 | + /** @var IL10N */ |
|
34 | + protected $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - protected $url; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + protected $url; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $url) { |
|
40 | - $this->l = $l; |
|
41 | - $this->url = $url; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $url) { |
|
40 | + $this->l = $l; |
|
41 | + $this->url = $url; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return string Lowercase a-z and underscore only identifier |
|
46 | - * @since 11.0.0 |
|
47 | - */ |
|
48 | - public function getIdentifier() { |
|
49 | - return 'calendar'; |
|
50 | - } |
|
44 | + /** |
|
45 | + * @return string Lowercase a-z and underscore only identifier |
|
46 | + * @since 11.0.0 |
|
47 | + */ |
|
48 | + public function getIdentifier() { |
|
49 | + return 'calendar'; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return string A translated string |
|
54 | - * @since 11.0.0 |
|
55 | - */ |
|
56 | - public function getName() { |
|
57 | - return $this->l->t('Calendar'); |
|
58 | - } |
|
52 | + /** |
|
53 | + * @return string A translated string |
|
54 | + * @since 11.0.0 |
|
55 | + */ |
|
56 | + public function getName() { |
|
57 | + return $this->l->t('Calendar'); |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @return int whether the filter should be rather on the top or bottom of |
|
62 | - * the admin section. The filters are arranged in ascending order of the |
|
63 | - * priority values. It is required to return a value between 0 and 100. |
|
64 | - * @since 11.0.0 |
|
65 | - */ |
|
66 | - public function getPriority() { |
|
67 | - return 40; |
|
68 | - } |
|
60 | + /** |
|
61 | + * @return int whether the filter should be rather on the top or bottom of |
|
62 | + * the admin section. The filters are arranged in ascending order of the |
|
63 | + * priority values. It is required to return a value between 0 and 100. |
|
64 | + * @since 11.0.0 |
|
65 | + */ |
|
66 | + public function getPriority() { |
|
67 | + return 40; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * @return string Full URL to an icon, empty string when none is given |
|
72 | - * @since 11.0.0 |
|
73 | - */ |
|
74 | - public function getIcon() { |
|
75 | - return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar.svg')); |
|
76 | - } |
|
70 | + /** |
|
71 | + * @return string Full URL to an icon, empty string when none is given |
|
72 | + * @since 11.0.0 |
|
73 | + */ |
|
74 | + public function getIcon() { |
|
75 | + return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar.svg')); |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @param string[] $types |
|
80 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
81 | - * @since 11.0.0 |
|
82 | - */ |
|
83 | - public function filterTypes(array $types) { |
|
84 | - return array_intersect(['calendar', 'calendar_event'], $types); |
|
85 | - } |
|
78 | + /** |
|
79 | + * @param string[] $types |
|
80 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
81 | + * @since 11.0.0 |
|
82 | + */ |
|
83 | + public function filterTypes(array $types) { |
|
84 | + return array_intersect(['calendar', 'calendar_event'], $types); |
|
85 | + } |
|
86 | 86 | |
87 | - /** |
|
88 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
89 | - * @since 11.0.0 |
|
90 | - */ |
|
91 | - public function allowedApps() { |
|
92 | - return []; |
|
93 | - } |
|
87 | + /** |
|
88 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
89 | + * @since 11.0.0 |
|
90 | + */ |
|
91 | + public function allowedApps() { |
|
92 | + return []; |
|
93 | + } |
|
94 | 94 | } |
@@ -30,19 +30,19 @@ |
||
30 | 30 | |
31 | 31 | class CheckBackupCodes implements IRepairStep { |
32 | 32 | |
33 | - /** @var IJobList */ |
|
34 | - private $jobList; |
|
33 | + /** @var IJobList */ |
|
34 | + private $jobList; |
|
35 | 35 | |
36 | - public function __construct(IJobList $jobList) { |
|
37 | - $this->jobList = $jobList; |
|
38 | - } |
|
36 | + public function __construct(IJobList $jobList) { |
|
37 | + $this->jobList = $jobList; |
|
38 | + } |
|
39 | 39 | |
40 | - public function getName(): string { |
|
41 | - return 'Add background job to check for backup codes'; |
|
42 | - } |
|
40 | + public function getName(): string { |
|
41 | + return 'Add background job to check for backup codes'; |
|
42 | + } |
|
43 | 43 | |
44 | - public function run(IOutput $output) { |
|
45 | - $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
46 | - } |
|
44 | + public function run(IOutput $output) { |
|
45 | + $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
46 | + } |
|
47 | 47 | |
48 | 48 | } |
@@ -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> |
@@ -24,33 +24,33 @@ |
||
24 | 24 | use OCP\IUser; |
25 | 25 | |
26 | 26 | interface ITrashManager extends ITrashBackend { |
27 | - /** |
|
28 | - * Add a backend for the trashbin |
|
29 | - * |
|
30 | - * @param string $storageType |
|
31 | - * @param ITrashBackend $backend |
|
32 | - * @since 15.0.0 |
|
33 | - */ |
|
34 | - public function registerBackend(string $storageType, ITrashBackend $backend); |
|
27 | + /** |
|
28 | + * Add a backend for the trashbin |
|
29 | + * |
|
30 | + * @param string $storageType |
|
31 | + * @param ITrashBackend $backend |
|
32 | + * @since 15.0.0 |
|
33 | + */ |
|
34 | + public function registerBackend(string $storageType, ITrashBackend $backend); |
|
35 | 35 | |
36 | - /** |
|
37 | - * List all trash items in the root of the trashbin |
|
38 | - * |
|
39 | - * @param IUser $user |
|
40 | - * @return ITrashItem[] |
|
41 | - * @since 15.0.0 |
|
42 | - */ |
|
43 | - public function listTrashRoot(IUser $user): array; |
|
36 | + /** |
|
37 | + * List all trash items in the root of the trashbin |
|
38 | + * |
|
39 | + * @param IUser $user |
|
40 | + * @return ITrashItem[] |
|
41 | + * @since 15.0.0 |
|
42 | + */ |
|
43 | + public function listTrashRoot(IUser $user): array; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Temporally prevent files from being moved to the trash |
|
47 | - * |
|
48 | - * @since 15.0.0 |
|
49 | - */ |
|
50 | - public function pauseTrash(); |
|
45 | + /** |
|
46 | + * Temporally prevent files from being moved to the trash |
|
47 | + * |
|
48 | + * @since 15.0.0 |
|
49 | + */ |
|
50 | + public function pauseTrash(); |
|
51 | 51 | |
52 | - /** |
|
53 | - * @since 15.0.0 |
|
54 | - */ |
|
55 | - public function resumeTrash(); |
|
52 | + /** |
|
53 | + * @since 15.0.0 |
|
54 | + */ |
|
55 | + public function resumeTrash(); |
|
56 | 56 | } |
@@ -31,54 +31,54 @@ |
||
31 | 31 | * @since 15.0.0 |
32 | 32 | */ |
33 | 33 | interface ITrashBackend { |
34 | - /** |
|
35 | - * List all trash items in the root of the trashbin |
|
36 | - * |
|
37 | - * @param IUser $user |
|
38 | - * @return ITrashItem[] |
|
39 | - * @since 15.0.0 |
|
40 | - */ |
|
41 | - public function listTrashRoot(IUser $user): array; |
|
34 | + /** |
|
35 | + * List all trash items in the root of the trashbin |
|
36 | + * |
|
37 | + * @param IUser $user |
|
38 | + * @return ITrashItem[] |
|
39 | + * @since 15.0.0 |
|
40 | + */ |
|
41 | + public function listTrashRoot(IUser $user): array; |
|
42 | 42 | |
43 | - /** |
|
44 | - * List all trash items in a subfolder in the trashbin |
|
45 | - * |
|
46 | - * @param ITrashItem $folder |
|
47 | - * @return ITrashItem[] |
|
48 | - * @since 15.0.0 |
|
49 | - */ |
|
50 | - public function listTrashFolder(ITrashItem $folder): array; |
|
43 | + /** |
|
44 | + * List all trash items in a subfolder in the trashbin |
|
45 | + * |
|
46 | + * @param ITrashItem $folder |
|
47 | + * @return ITrashItem[] |
|
48 | + * @since 15.0.0 |
|
49 | + */ |
|
50 | + public function listTrashFolder(ITrashItem $folder): array; |
|
51 | 51 | |
52 | - /** |
|
53 | - * Restore a trashbin item |
|
54 | - * |
|
55 | - * @param ITrashItem $item |
|
56 | - * @since 15.0.0 |
|
57 | - */ |
|
58 | - public function restoreItem(ITrashItem $item); |
|
52 | + /** |
|
53 | + * Restore a trashbin item |
|
54 | + * |
|
55 | + * @param ITrashItem $item |
|
56 | + * @since 15.0.0 |
|
57 | + */ |
|
58 | + public function restoreItem(ITrashItem $item); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Permanently remove an item from trash |
|
62 | - * |
|
63 | - * @param ITrashItem $item |
|
64 | - * @since 15.0.0 |
|
65 | - */ |
|
66 | - public function removeItem(ITrashItem $item); |
|
60 | + /** |
|
61 | + * Permanently remove an item from trash |
|
62 | + * |
|
63 | + * @param ITrashItem $item |
|
64 | + * @since 15.0.0 |
|
65 | + */ |
|
66 | + public function removeItem(ITrashItem $item); |
|
67 | 67 | |
68 | - /** |
|
69 | - * Move a file or folder to trash |
|
70 | - * |
|
71 | - * @param IStorage $storage |
|
72 | - * @param string $internalPath |
|
73 | - * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally |
|
74 | - * @since 15.0.0 |
|
75 | - */ |
|
76 | - public function moveToTrash(IStorage $storage, string $internalPath): bool; |
|
68 | + /** |
|
69 | + * Move a file or folder to trash |
|
70 | + * |
|
71 | + * @param IStorage $storage |
|
72 | + * @param string $internalPath |
|
73 | + * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally |
|
74 | + * @since 15.0.0 |
|
75 | + */ |
|
76 | + public function moveToTrash(IStorage $storage, string $internalPath): bool; |
|
77 | 77 | |
78 | - /** |
|
79 | - * @param IUser $user |
|
80 | - * @param int $fileId |
|
81 | - * @return Node|null |
|
82 | - */ |
|
83 | - public function getTrashNodeById(IUser $user, int $fileId); |
|
78 | + /** |
|
79 | + * @param IUser $user |
|
80 | + * @param int $fileId |
|
81 | + * @return Node|null |
|
82 | + */ |
|
83 | + public function getTrashNodeById(IUser $user, int $fileId); |
|
84 | 84 | } |
@@ -29,49 +29,49 @@ |
||
29 | 29 | use Sabre\DAV\ICollection; |
30 | 30 | |
31 | 31 | abstract class AbstractTrashFolder extends AbstractTrash implements ICollection, ITrash { |
32 | - public function getChildren(): array { |
|
33 | - $entries = $this->trashManager->listTrashFolder($this->data); |
|
32 | + public function getChildren(): array { |
|
33 | + $entries = $this->trashManager->listTrashFolder($this->data); |
|
34 | 34 | |
35 | - $children = array_map(function (ITrashItem $entry) { |
|
36 | - if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
37 | - return new TrashFolderFolder($this->trashManager, $entry); |
|
38 | - } |
|
39 | - return new TrashFolderFile($this->trashManager, $entry); |
|
40 | - }, $entries); |
|
35 | + $children = array_map(function (ITrashItem $entry) { |
|
36 | + if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
37 | + return new TrashFolderFolder($this->trashManager, $entry); |
|
38 | + } |
|
39 | + return new TrashFolderFile($this->trashManager, $entry); |
|
40 | + }, $entries); |
|
41 | 41 | |
42 | - return $children; |
|
43 | - } |
|
42 | + return $children; |
|
43 | + } |
|
44 | 44 | |
45 | - public function getChild($name): ITrash { |
|
46 | - $entries = $this->getChildren(); |
|
45 | + public function getChild($name): ITrash { |
|
46 | + $entries = $this->getChildren(); |
|
47 | 47 | |
48 | - foreach ($entries as $entry) { |
|
49 | - if ($entry->getName() === $name) { |
|
50 | - return $entry; |
|
51 | - } |
|
52 | - } |
|
48 | + foreach ($entries as $entry) { |
|
49 | + if ($entry->getName() === $name) { |
|
50 | + return $entry; |
|
51 | + } |
|
52 | + } |
|
53 | 53 | |
54 | - throw new NotFound(); |
|
55 | - } |
|
54 | + throw new NotFound(); |
|
55 | + } |
|
56 | 56 | |
57 | - public function childExists($name): bool { |
|
58 | - try { |
|
59 | - $this->getChild($name); |
|
60 | - return true; |
|
61 | - } catch (NotFound $e) { |
|
62 | - return false; |
|
63 | - } |
|
64 | - } |
|
57 | + public function childExists($name): bool { |
|
58 | + try { |
|
59 | + $this->getChild($name); |
|
60 | + return true; |
|
61 | + } catch (NotFound $e) { |
|
62 | + return false; |
|
63 | + } |
|
64 | + } |
|
65 | 65 | |
66 | - public function setName($name) { |
|
67 | - throw new Forbidden(); |
|
68 | - } |
|
66 | + public function setName($name) { |
|
67 | + throw new Forbidden(); |
|
68 | + } |
|
69 | 69 | |
70 | - public function createFile($name, $data = null) { |
|
71 | - throw new Forbidden(); |
|
72 | - } |
|
70 | + public function createFile($name, $data = null) { |
|
71 | + throw new Forbidden(); |
|
72 | + } |
|
73 | 73 | |
74 | - public function createDirectory($name) { |
|
75 | - throw new Forbidden(); |
|
76 | - } |
|
74 | + public function createDirectory($name) { |
|
75 | + throw new Forbidden(); |
|
76 | + } |
|
77 | 77 | } |
@@ -26,16 +26,16 @@ |
||
26 | 26 | use OC\Authentication\Token\IToken; |
27 | 27 | |
28 | 28 | class ExpiredTokenException extends InvalidTokenException { |
29 | - /** @var IToken */ |
|
30 | - private $token; |
|
29 | + /** @var IToken */ |
|
30 | + private $token; |
|
31 | 31 | |
32 | - public function __construct(IToken $token) { |
|
33 | - parent::__construct(); |
|
32 | + public function __construct(IToken $token) { |
|
33 | + parent::__construct(); |
|
34 | 34 | |
35 | - $this->token = $token; |
|
36 | - } |
|
35 | + $this->token = $token; |
|
36 | + } |
|
37 | 37 | |
38 | - public function getToken(): IToken { |
|
39 | - return $this->token; |
|
40 | - } |
|
38 | + public function getToken(): IToken { |
|
39 | + return $this->token; |
|
40 | + } |
|
41 | 41 | } |
@@ -25,12 +25,12 @@ |
||
25 | 25 | * @since 15.0.0 |
26 | 26 | */ |
27 | 27 | interface IVersionManager extends IVersionBackend { |
28 | - /** |
|
29 | - * Register a new backend |
|
30 | - * |
|
31 | - * @param string $storageType |
|
32 | - * @param IVersionBackend $backend |
|
33 | - * @since 15.0.0 |
|
34 | - */ |
|
35 | - public function registerBackend(string $storageType, IVersionBackend $backend); |
|
28 | + /** |
|
29 | + * Register a new backend |
|
30 | + * |
|
31 | + * @param string $storageType |
|
32 | + * @param IVersionBackend $backend |
|
33 | + * @since 15.0.0 |
|
34 | + */ |
|
35 | + public function registerBackend(string $storageType, IVersionBackend $backend); |
|
36 | 36 | } |
@@ -32,18 +32,18 @@ |
||
32 | 32 | |
33 | 33 | class Version1008Date20181105112049 extends SimpleMigrationStep { |
34 | 34 | |
35 | - /** |
|
36 | - * @param IOutput $output |
|
37 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | - * @param array $options |
|
39 | - * @return null|ISchemaWrapper |
|
40 | - */ |
|
41 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | - /** @var ISchemaWrapper $schema */ |
|
43 | - $schema = $schemaClosure(); |
|
44 | - $table = $schema->getTable('calendarsubscriptions'); |
|
45 | - $table->dropColumn('source_copy'); |
|
35 | + /** |
|
36 | + * @param IOutput $output |
|
37 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | + * @param array $options |
|
39 | + * @return null|ISchemaWrapper |
|
40 | + */ |
|
41 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | + /** @var ISchemaWrapper $schema */ |
|
43 | + $schema = $schemaClosure(); |
|
44 | + $table = $schema->getTable('calendarsubscriptions'); |
|
45 | + $table->dropColumn('source_copy'); |
|
46 | 46 | |
47 | - return $schema; |
|
48 | - } |
|
47 | + return $schema; |
|
48 | + } |
|
49 | 49 | } |