@@ -32,17 +32,17 @@ |
||
32 | 32 | * @since 20.0.0 |
33 | 33 | */ |
34 | 34 | interface IDeferrableApp extends IApp { |
35 | - /** |
|
36 | - * Start deferring notifications until `flush()` is called |
|
37 | - * |
|
38 | - * @since 20.0.0 |
|
39 | - */ |
|
40 | - public function defer(): void; |
|
35 | + /** |
|
36 | + * Start deferring notifications until `flush()` is called |
|
37 | + * |
|
38 | + * @since 20.0.0 |
|
39 | + */ |
|
40 | + public function defer(): void; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Send all deferred notifications that have been stored since `defer()` was called |
|
44 | - * |
|
45 | - * @since 20.0.0 |
|
46 | - */ |
|
47 | - public function flush(): void; |
|
42 | + /** |
|
43 | + * Send all deferred notifications that have been stored since `defer()` was called |
|
44 | + * |
|
45 | + * @since 20.0.0 |
|
46 | + */ |
|
47 | + public function flush(): void; |
|
48 | 48 | } |
@@ -33,51 +33,51 @@ |
||
33 | 33 | |
34 | 34 | class Version1010Date20200630191302 extends SimpleMigrationStep { |
35 | 35 | |
36 | - /** |
|
37 | - * @param IOutput $output |
|
38 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | - * @param array $options |
|
40 | - * @return null|ISchemaWrapper |
|
41 | - */ |
|
42 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
43 | - /** @var ISchemaWrapper $schema */ |
|
44 | - $schema = $schemaClosure(); |
|
36 | + /** |
|
37 | + * @param IOutput $output |
|
38 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | + * @param array $options |
|
40 | + * @return null|ISchemaWrapper |
|
41 | + */ |
|
42 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
43 | + /** @var ISchemaWrapper $schema */ |
|
44 | + $schema = $schemaClosure(); |
|
45 | 45 | |
46 | - if (!$schema->hasTable('trusted_servers')) { |
|
47 | - $table = $schema->createTable('trusted_servers'); |
|
48 | - $table->addColumn('id', Types::INTEGER, [ |
|
49 | - 'autoincrement' => true, |
|
50 | - 'notnull' => true, |
|
51 | - 'length' => 4, |
|
52 | - ]); |
|
53 | - $table->addColumn('url', Types::STRING, [ |
|
54 | - 'notnull' => true, |
|
55 | - 'length' => 512, |
|
56 | - ]); |
|
57 | - $table->addColumn('url_hash', Types::STRING, [ |
|
58 | - 'notnull' => true, |
|
59 | - 'default' => '', |
|
60 | - ]); |
|
61 | - $table->addColumn('token', Types::STRING, [ |
|
62 | - 'notnull' => false, |
|
63 | - 'length' => 128, |
|
64 | - ]); |
|
65 | - $table->addColumn('shared_secret', Types::STRING, [ |
|
66 | - 'notnull' => false, |
|
67 | - 'length' => 256, |
|
68 | - ]); |
|
69 | - $table->addColumn('status', Types::INTEGER, [ |
|
70 | - 'notnull' => true, |
|
71 | - 'length' => 4, |
|
72 | - 'default' => 2, |
|
73 | - ]); |
|
74 | - $table->addColumn('sync_token', Types::STRING, [ |
|
75 | - 'notnull' => false, |
|
76 | - 'length' => 512, |
|
77 | - ]); |
|
78 | - $table->setPrimaryKey(['id']); |
|
79 | - $table->addUniqueIndex(['url_hash'], 'url_hash'); |
|
80 | - } |
|
81 | - return $schema; |
|
82 | - } |
|
46 | + if (!$schema->hasTable('trusted_servers')) { |
|
47 | + $table = $schema->createTable('trusted_servers'); |
|
48 | + $table->addColumn('id', Types::INTEGER, [ |
|
49 | + 'autoincrement' => true, |
|
50 | + 'notnull' => true, |
|
51 | + 'length' => 4, |
|
52 | + ]); |
|
53 | + $table->addColumn('url', Types::STRING, [ |
|
54 | + 'notnull' => true, |
|
55 | + 'length' => 512, |
|
56 | + ]); |
|
57 | + $table->addColumn('url_hash', Types::STRING, [ |
|
58 | + 'notnull' => true, |
|
59 | + 'default' => '', |
|
60 | + ]); |
|
61 | + $table->addColumn('token', Types::STRING, [ |
|
62 | + 'notnull' => false, |
|
63 | + 'length' => 128, |
|
64 | + ]); |
|
65 | + $table->addColumn('shared_secret', Types::STRING, [ |
|
66 | + 'notnull' => false, |
|
67 | + 'length' => 256, |
|
68 | + ]); |
|
69 | + $table->addColumn('status', Types::INTEGER, [ |
|
70 | + 'notnull' => true, |
|
71 | + 'length' => 4, |
|
72 | + 'default' => 2, |
|
73 | + ]); |
|
74 | + $table->addColumn('sync_token', Types::STRING, [ |
|
75 | + 'notnull' => false, |
|
76 | + 'length' => 512, |
|
77 | + ]); |
|
78 | + $table->setPrimaryKey(['id']); |
|
79 | + $table->addUniqueIndex(['url_hash'], 'url_hash'); |
|
80 | + } |
|
81 | + return $schema; |
|
82 | + } |
|
83 | 83 | } |
@@ -33,16 +33,16 @@ |
||
33 | 33 | use OCP\Contacts\Events\ContactInteractedWithEvent; |
34 | 34 | |
35 | 35 | class Application extends App implements IBootstrap { |
36 | - public const APP_ID = 'contactsinteraction'; |
|
36 | + public const APP_ID = 'contactsinteraction'; |
|
37 | 37 | |
38 | - public function __construct() { |
|
39 | - parent::__construct(self::APP_ID); |
|
40 | - } |
|
38 | + public function __construct() { |
|
39 | + parent::__construct(self::APP_ID); |
|
40 | + } |
|
41 | 41 | |
42 | - public function register(IRegistrationContext $context): void { |
|
43 | - $context->registerEventListener(ContactInteractedWithEvent::class, ContactInteractionListener::class); |
|
44 | - } |
|
42 | + public function register(IRegistrationContext $context): void { |
|
43 | + $context->registerEventListener(ContactInteractedWithEvent::class, ContactInteractionListener::class); |
|
44 | + } |
|
45 | 45 | |
46 | - public function boot(IBootContext $context): void { |
|
47 | - } |
|
46 | + public function boot(IBootContext $context): void { |
|
47 | + } |
|
48 | 48 | } |
@@ -33,16 +33,16 @@ |
||
33 | 33 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
34 | 34 | |
35 | 35 | class Application extends App implements IBootstrap { |
36 | - public const APP_ID = 'cloud_federation_api'; |
|
36 | + public const APP_ID = 'cloud_federation_api'; |
|
37 | 37 | |
38 | - public function __construct() { |
|
39 | - parent::__construct(self::APP_ID); |
|
40 | - } |
|
38 | + public function __construct() { |
|
39 | + parent::__construct(self::APP_ID); |
|
40 | + } |
|
41 | 41 | |
42 | - public function register(IRegistrationContext $context): void { |
|
43 | - $context->registerCapability(Capabilities::class); |
|
44 | - } |
|
42 | + public function register(IRegistrationContext $context): void { |
|
43 | + $context->registerCapability(Capabilities::class); |
|
44 | + } |
|
45 | 45 | |
46 | - public function boot(IBootContext $context): void { |
|
47 | - } |
|
46 | + public function boot(IBootContext $context): void { |
|
47 | + } |
|
48 | 48 | } |
@@ -32,12 +32,12 @@ |
||
32 | 32 | * SSO providers that also have a SSO logout url |
33 | 33 | */ |
34 | 34 | interface ICustomLogout { |
35 | - /** |
|
36 | - * @since 20.0.0 |
|
37 | - * |
|
38 | - * The url to redirect to for logout |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getLogoutUrl(): string; |
|
35 | + /** |
|
36 | + * @since 20.0.0 |
|
37 | + * |
|
38 | + * The url to redirect to for logout |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getLogoutUrl(): string; |
|
43 | 43 | } |
@@ -31,45 +31,45 @@ |
||
31 | 31 | */ |
32 | 32 | trait UserTrait { |
33 | 33 | |
34 | - /** @var IUserSession */ |
|
35 | - protected $userSession; |
|
34 | + /** @var IUserSession */ |
|
35 | + protected $userSession; |
|
36 | 36 | |
37 | - /** |
|
38 | - * User override |
|
39 | - * |
|
40 | - * @var IUser|null |
|
41 | - */ |
|
42 | - private $user = null; |
|
37 | + /** |
|
38 | + * User override |
|
39 | + * |
|
40 | + * @var IUser|null |
|
41 | + */ |
|
42 | + private $user = null; |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return IUser|null |
|
46 | - */ |
|
47 | - protected function getUser() { |
|
48 | - if ($this->user) { |
|
49 | - return $this->user; |
|
50 | - } |
|
51 | - return $this->userSession->getUser(); |
|
52 | - } |
|
44 | + /** |
|
45 | + * @return IUser|null |
|
46 | + */ |
|
47 | + protected function getUser() { |
|
48 | + if ($this->user) { |
|
49 | + return $this->user; |
|
50 | + } |
|
51 | + return $this->userSession->getUser(); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Override the user from the session |
|
56 | - * Unset with ->resetUser() when finished! |
|
57 | - * |
|
58 | - * @param IUser $user |
|
59 | - * @return self |
|
60 | - */ |
|
61 | - public function setUser(IUser $user) { |
|
62 | - $this->user = $user; |
|
63 | - return $this; |
|
64 | - } |
|
54 | + /** |
|
55 | + * Override the user from the session |
|
56 | + * Unset with ->resetUser() when finished! |
|
57 | + * |
|
58 | + * @param IUser $user |
|
59 | + * @return self |
|
60 | + */ |
|
61 | + public function setUser(IUser $user) { |
|
62 | + $this->user = $user; |
|
63 | + return $this; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * Reset the user override |
|
68 | - * |
|
69 | - * @return self |
|
70 | - */ |
|
71 | - public function resetUser() { |
|
72 | - $this->user = null; |
|
73 | - return $this; |
|
74 | - } |
|
66 | + /** |
|
67 | + * Reset the user override |
|
68 | + * |
|
69 | + * @return self |
|
70 | + */ |
|
71 | + public function resetUser() { |
|
72 | + $this->user = null; |
|
73 | + return $this; |
|
74 | + } |
|
75 | 75 | } |
@@ -4,11 +4,11 @@ |
||
4 | 4 | /** @var \OCP\Defaults $theme */ |
5 | 5 | // @codeCoverageIgnoreStart |
6 | 6 | if (!isset($_)) {//standalone page is not supported anymore - redirect to / |
7 | - require_once '../../lib/base.php'; |
|
7 | + require_once '../../lib/base.php'; |
|
8 | 8 | |
9 | - $urlGenerator = \OC::$server->getURLGenerator(); |
|
10 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
11 | - exit; |
|
9 | + $urlGenerator = \OC::$server->getURLGenerator(); |
|
10 | + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
11 | + exit; |
|
12 | 12 | } |
13 | 13 | // @codeCoverageIgnoreEnd |
14 | 14 | ?> |
@@ -31,11 +31,11 @@ |
||
31 | 31 | * @since 20.0.0 |
32 | 32 | */ |
33 | 33 | interface IRootMountProvider { |
34 | - /** |
|
35 | - * Get all root mountpoints of this provider |
|
36 | - * |
|
37 | - * @return \OCP\Files\Mount\IMountPoint[] |
|
38 | - * @since 20.0.0 |
|
39 | - */ |
|
40 | - public function getRootMounts(IStorageFactory $loader): array; |
|
34 | + /** |
|
35 | + * Get all root mountpoints of this provider |
|
36 | + * |
|
37 | + * @return \OCP\Files\Mount\IMountPoint[] |
|
38 | + * @since 20.0.0 |
|
39 | + */ |
|
40 | + public function getRootMounts(IStorageFactory $loader): array; |
|
41 | 41 | } |
@@ -36,56 +36,56 @@ |
||
36 | 36 | * @since 18.0.0 |
37 | 37 | */ |
38 | 38 | interface IRuleMatcher extends IFileCheck { |
39 | - /** |
|
40 | - * This method is left for backwards compatibility and easier porting of |
|
41 | - * apps. Please use 'getFlows' instead (and setOperation if you implement |
|
42 | - * an IComplexOperation). |
|
43 | - * |
|
44 | - * @since 18.0.0 |
|
45 | - * @deprecated 18.0.0 |
|
46 | - */ |
|
47 | - public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array; |
|
39 | + /** |
|
40 | + * This method is left for backwards compatibility and easier porting of |
|
41 | + * apps. Please use 'getFlows' instead (and setOperation if you implement |
|
42 | + * an IComplexOperation). |
|
43 | + * |
|
44 | + * @since 18.0.0 |
|
45 | + * @deprecated 18.0.0 |
|
46 | + */ |
|
47 | + public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array; |
|
48 | 48 | |
49 | - /** |
|
50 | - * @throws RuntimeException |
|
51 | - * @since 18.0.0 |
|
52 | - */ |
|
53 | - public function getFlows(bool $returnFirstMatchingOperationOnly = true): array; |
|
49 | + /** |
|
50 | + * @throws RuntimeException |
|
51 | + * @since 18.0.0 |
|
52 | + */ |
|
53 | + public function getFlows(bool $returnFirstMatchingOperationOnly = true): array; |
|
54 | 54 | |
55 | - /** |
|
56 | - * this method can only be called once and is typically called by the |
|
57 | - * Flow engine, unless for IComplexOperations. |
|
58 | - * |
|
59 | - * @throws RuntimeException |
|
60 | - * @since 18.0.0 |
|
61 | - */ |
|
62 | - public function setOperation(IOperation $operation): void; |
|
55 | + /** |
|
56 | + * this method can only be called once and is typically called by the |
|
57 | + * Flow engine, unless for IComplexOperations. |
|
58 | + * |
|
59 | + * @throws RuntimeException |
|
60 | + * @since 18.0.0 |
|
61 | + */ |
|
62 | + public function setOperation(IOperation $operation): void; |
|
63 | 63 | |
64 | - /** |
|
65 | - * this method can only be called once and is typically called by the |
|
66 | - * Flow engine, unless for IComplexOperations. |
|
67 | - * |
|
68 | - * @throws RuntimeException |
|
69 | - * @since 18.0.0 |
|
70 | - */ |
|
71 | - public function setEntity(IEntity $entity): void; |
|
64 | + /** |
|
65 | + * this method can only be called once and is typically called by the |
|
66 | + * Flow engine, unless for IComplexOperations. |
|
67 | + * |
|
68 | + * @throws RuntimeException |
|
69 | + * @since 18.0.0 |
|
70 | + */ |
|
71 | + public function setEntity(IEntity $entity): void; |
|
72 | 72 | |
73 | - /** |
|
74 | - * returns the entity which might provide more information, depending on |
|
75 | - * the interfaces it implements |
|
76 | - * |
|
77 | - * @return IEntity |
|
78 | - * @since 18.0.0 |
|
79 | - */ |
|
80 | - public function getEntity(): IEntity; |
|
73 | + /** |
|
74 | + * returns the entity which might provide more information, depending on |
|
75 | + * the interfaces it implements |
|
76 | + * |
|
77 | + * @return IEntity |
|
78 | + * @since 18.0.0 |
|
79 | + */ |
|
80 | + public function getEntity(): IEntity; |
|
81 | 81 | |
82 | - /** |
|
83 | - * this method can be called once to set the event name that is currently |
|
84 | - * being processed. The workflow engine takes care of this usually, only an |
|
85 | - * IComplexOperation might want to make use of it. |
|
86 | - * |
|
87 | - * @throws RuntimeException |
|
88 | - * @since 20.0.0 |
|
89 | - */ |
|
90 | - public function setEventName(string $eventName): void; |
|
82 | + /** |
|
83 | + * this method can be called once to set the event name that is currently |
|
84 | + * being processed. The workflow engine takes care of this usually, only an |
|
85 | + * IComplexOperation might want to make use of it. |
|
86 | + * |
|
87 | + * @throws RuntimeException |
|
88 | + * @since 20.0.0 |
|
89 | + */ |
|
90 | + public function setEventName(string $eventName): void; |
|
91 | 91 | } |