@@ -32,42 +32,42 @@ |
||
32 | 32 | */ |
33 | 33 | interface ICalendarProvider { |
34 | 34 | |
35 | - /** |
|
36 | - * Provides the appId of the plugin |
|
37 | - * |
|
38 | - * @since 19.0.0 |
|
39 | - * @return string AppId |
|
40 | - */ |
|
41 | - public function getAppId(): string; |
|
35 | + /** |
|
36 | + * Provides the appId of the plugin |
|
37 | + * |
|
38 | + * @since 19.0.0 |
|
39 | + * @return string AppId |
|
40 | + */ |
|
41 | + public function getAppId(): string; |
|
42 | 42 | |
43 | - /** |
|
44 | - * Fetches all calendars for a given principal uri |
|
45 | - * |
|
46 | - * @since 19.0.0 |
|
47 | - * @param string $principalUri E.g. principals/users/user1 |
|
48 | - * @return ExternalCalendar[] Array of all calendars |
|
49 | - */ |
|
50 | - public function fetchAllForCalendarHome(string $principalUri): array; |
|
43 | + /** |
|
44 | + * Fetches all calendars for a given principal uri |
|
45 | + * |
|
46 | + * @since 19.0.0 |
|
47 | + * @param string $principalUri E.g. principals/users/user1 |
|
48 | + * @return ExternalCalendar[] Array of all calendars |
|
49 | + */ |
|
50 | + public function fetchAllForCalendarHome(string $principalUri): array; |
|
51 | 51 | |
52 | - /** |
|
53 | - * Checks whether plugin has a calendar for a given principalUri and calendarUri |
|
54 | - * |
|
55 | - * @since 19.0.0 |
|
56 | - * @param string $principalUri E.g. principals/users/user1 |
|
57 | - * @param string $calendarUri E.g. personal |
|
58 | - * @return bool True if calendar for principalUri and calendarUri exists, false otherwise |
|
59 | - */ |
|
60 | - public function hasCalendarInCalendarHome(string $principalUri, string $calendarUri): bool; |
|
52 | + /** |
|
53 | + * Checks whether plugin has a calendar for a given principalUri and calendarUri |
|
54 | + * |
|
55 | + * @since 19.0.0 |
|
56 | + * @param string $principalUri E.g. principals/users/user1 |
|
57 | + * @param string $calendarUri E.g. personal |
|
58 | + * @return bool True if calendar for principalUri and calendarUri exists, false otherwise |
|
59 | + */ |
|
60 | + public function hasCalendarInCalendarHome(string $principalUri, string $calendarUri): bool; |
|
61 | 61 | |
62 | - /** |
|
63 | - * Fetches a calendar for a given principalUri and calendarUri |
|
64 | - * Returns null if calendar does not exist |
|
65 | - * |
|
66 | - * @since 19.0.0 |
|
67 | - * @param string $principalUri E.g. principals/users/user1 |
|
68 | - * @param string $calendarUri E.g. personal |
|
69 | - * @return ExternalCalendar|null Calendar if it exists, null otherwise |
|
70 | - */ |
|
71 | - public function getCalendarInCalendarHome(string $principalUri, string $calendarUri): ?ExternalCalendar; |
|
62 | + /** |
|
63 | + * Fetches a calendar for a given principalUri and calendarUri |
|
64 | + * Returns null if calendar does not exist |
|
65 | + * |
|
66 | + * @since 19.0.0 |
|
67 | + * @param string $principalUri E.g. principals/users/user1 |
|
68 | + * @param string $calendarUri E.g. personal |
|
69 | + * @return ExternalCalendar|null Calendar if it exists, null otherwise |
|
70 | + */ |
|
71 | + public function getCalendarInCalendarHome(string $principalUri, string $calendarUri): ?ExternalCalendar; |
|
72 | 72 | |
73 | 73 | } |
@@ -33,61 +33,61 @@ |
||
33 | 33 | |
34 | 34 | class Version010000Date20200304152605 extends SimpleMigrationStep { |
35 | 35 | |
36 | - /** |
|
37 | - * @param IOutput $output |
|
38 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | - * @param array $options |
|
40 | - * |
|
41 | - * @return ISchemaWrapper |
|
42 | - */ |
|
43 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { |
|
44 | - /** @var ISchemaWrapper $schema */ |
|
45 | - $schema = $schemaClosure(); |
|
36 | + /** |
|
37 | + * @param IOutput $output |
|
38 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | + * @param array $options |
|
40 | + * |
|
41 | + * @return ISchemaWrapper |
|
42 | + */ |
|
43 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { |
|
44 | + /** @var ISchemaWrapper $schema */ |
|
45 | + $schema = $schemaClosure(); |
|
46 | 46 | |
47 | - $table = $schema->createTable(RecentContactMapper::TABLE_NAME); |
|
48 | - $table->addColumn('id', 'integer', [ |
|
49 | - 'autoincrement' => true, |
|
50 | - 'notnull' => true, |
|
51 | - 'length' => 4, |
|
52 | - ]); |
|
53 | - $table->addColumn('actor_uid', 'string', [ |
|
54 | - 'notnull' => true, |
|
55 | - 'length' => 64, |
|
56 | - ]); |
|
57 | - $table->addColumn('uid', 'string', [ |
|
58 | - 'notnull' => false, |
|
59 | - 'length' => 64, |
|
60 | - ]); |
|
61 | - $table->addColumn('email', 'string', [ |
|
62 | - 'notnull' => false, |
|
63 | - 'length' => 255, |
|
64 | - ]); |
|
65 | - $table->addColumn('federated_cloud_id', 'string', [ |
|
66 | - 'notnull' => false, |
|
67 | - 'length' => 255, |
|
68 | - ]); |
|
69 | - $table->addColumn('card', 'blob', [ |
|
70 | - 'notnull' => true, |
|
71 | - ]); |
|
72 | - $table->addColumn('last_contact', 'integer', [ |
|
73 | - 'notnull' => true, |
|
74 | - 'length' => 4, |
|
75 | - ]); |
|
76 | - $table->setPrimaryKey(['id']); |
|
77 | - // To find all recent entries |
|
78 | - $table->addIndex(['actor_uid'], RecentContactMapper::TABLE_NAME . '_actor_uid'); |
|
79 | - // To find a specific entry |
|
80 | - $table->addIndex(['id', 'actor_uid'], RecentContactMapper::TABLE_NAME . '_id_uid'); |
|
81 | - // To find all recent entries with a given UID |
|
82 | - $table->addIndex(['uid'], RecentContactMapper::TABLE_NAME . '_uid'); |
|
83 | - // To find all recent entries with a given email address |
|
84 | - $table->addIndex(['email'], RecentContactMapper::TABLE_NAME . '_email'); |
|
85 | - // To find all recent entries with a give federated cloud id |
|
86 | - $table->addIndex(['federated_cloud_id'], RecentContactMapper::TABLE_NAME . '_fed_id'); |
|
87 | - // For the cleanup |
|
88 | - $table->addIndex(['last_contact'], RecentContactMapper::TABLE_NAME . '_last_contact'); |
|
47 | + $table = $schema->createTable(RecentContactMapper::TABLE_NAME); |
|
48 | + $table->addColumn('id', 'integer', [ |
|
49 | + 'autoincrement' => true, |
|
50 | + 'notnull' => true, |
|
51 | + 'length' => 4, |
|
52 | + ]); |
|
53 | + $table->addColumn('actor_uid', 'string', [ |
|
54 | + 'notnull' => true, |
|
55 | + 'length' => 64, |
|
56 | + ]); |
|
57 | + $table->addColumn('uid', 'string', [ |
|
58 | + 'notnull' => false, |
|
59 | + 'length' => 64, |
|
60 | + ]); |
|
61 | + $table->addColumn('email', 'string', [ |
|
62 | + 'notnull' => false, |
|
63 | + 'length' => 255, |
|
64 | + ]); |
|
65 | + $table->addColumn('federated_cloud_id', 'string', [ |
|
66 | + 'notnull' => false, |
|
67 | + 'length' => 255, |
|
68 | + ]); |
|
69 | + $table->addColumn('card', 'blob', [ |
|
70 | + 'notnull' => true, |
|
71 | + ]); |
|
72 | + $table->addColumn('last_contact', 'integer', [ |
|
73 | + 'notnull' => true, |
|
74 | + 'length' => 4, |
|
75 | + ]); |
|
76 | + $table->setPrimaryKey(['id']); |
|
77 | + // To find all recent entries |
|
78 | + $table->addIndex(['actor_uid'], RecentContactMapper::TABLE_NAME . '_actor_uid'); |
|
79 | + // To find a specific entry |
|
80 | + $table->addIndex(['id', 'actor_uid'], RecentContactMapper::TABLE_NAME . '_id_uid'); |
|
81 | + // To find all recent entries with a given UID |
|
82 | + $table->addIndex(['uid'], RecentContactMapper::TABLE_NAME . '_uid'); |
|
83 | + // To find all recent entries with a given email address |
|
84 | + $table->addIndex(['email'], RecentContactMapper::TABLE_NAME . '_email'); |
|
85 | + // To find all recent entries with a give federated cloud id |
|
86 | + $table->addIndex(['federated_cloud_id'], RecentContactMapper::TABLE_NAME . '_fed_id'); |
|
87 | + // For the cleanup |
|
88 | + $table->addIndex(['last_contact'], RecentContactMapper::TABLE_NAME . '_last_contact'); |
|
89 | 89 | |
90 | - return $schema; |
|
91 | - } |
|
90 | + return $schema; |
|
91 | + } |
|
92 | 92 | |
93 | 93 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix); |
36 | 36 | $configuration = $connection->getConfiguration(); |
37 | 37 | if (isset($configuration['ldap_agent_password']) && $configuration['ldap_agent_password'] !== '') { |
38 | - // hide password |
|
39 | - $configuration['ldap_agent_password'] = '**PASSWORD SET**'; |
|
38 | + // hide password |
|
39 | + $configuration['ldap_agent_password'] = '**PASSWORD SET**'; |
|
40 | 40 | } |
41 | 41 | \OC_JSON::success(['configuration' => $configuration]); |
@@ -29,40 +29,40 @@ |
||
29 | 29 | * @deprecated 18.0.0 |
30 | 30 | */ |
31 | 31 | class TemplateManager { |
32 | - protected $templates = []; |
|
32 | + protected $templates = []; |
|
33 | 33 | |
34 | - public function registerTemplate($mimetype, $path) { |
|
35 | - $this->templates[$mimetype] = $path; |
|
36 | - } |
|
34 | + public function registerTemplate($mimetype, $path) { |
|
35 | + $this->templates[$mimetype] = $path; |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * get the path of the template for a mimetype |
|
40 | - * |
|
41 | - * @deprecated 18.0.0 |
|
42 | - * @param string $mimetype |
|
43 | - * @return string|null |
|
44 | - */ |
|
45 | - public function getTemplatePath($mimetype) { |
|
46 | - if (isset($this->templates[$mimetype])) { |
|
47 | - return $this->templates[$mimetype]; |
|
48 | - } else { |
|
49 | - return null; |
|
50 | - } |
|
51 | - } |
|
38 | + /** |
|
39 | + * get the path of the template for a mimetype |
|
40 | + * |
|
41 | + * @deprecated 18.0.0 |
|
42 | + * @param string $mimetype |
|
43 | + * @return string|null |
|
44 | + */ |
|
45 | + public function getTemplatePath($mimetype) { |
|
46 | + if (isset($this->templates[$mimetype])) { |
|
47 | + return $this->templates[$mimetype]; |
|
48 | + } else { |
|
49 | + return null; |
|
50 | + } |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * get the template content for a mimetype |
|
55 | - * |
|
56 | - * @deprecated 18.0.0 |
|
57 | - * @param string $mimetype |
|
58 | - * @return string |
|
59 | - */ |
|
60 | - public function getTemplate($mimetype) { |
|
61 | - $path = $this->getTemplatePath($mimetype); |
|
62 | - if ($path) { |
|
63 | - return file_get_contents($path); |
|
64 | - } else { |
|
65 | - return ''; |
|
66 | - } |
|
67 | - } |
|
53 | + /** |
|
54 | + * get the template content for a mimetype |
|
55 | + * |
|
56 | + * @deprecated 18.0.0 |
|
57 | + * @param string $mimetype |
|
58 | + * @return string |
|
59 | + */ |
|
60 | + public function getTemplate($mimetype) { |
|
61 | + $path = $this->getTemplatePath($mimetype); |
|
62 | + if ($path) { |
|
63 | + return file_get_contents($path); |
|
64 | + } else { |
|
65 | + return ''; |
|
66 | + } |
|
67 | + } |
|
68 | 68 | } |
@@ -31,43 +31,43 @@ |
||
31 | 31 | */ |
32 | 32 | interface IAddressBookProvider { |
33 | 33 | |
34 | - /** |
|
35 | - * Provides the appId of the plugin |
|
36 | - * |
|
37 | - * @since 19.0.0 |
|
38 | - * @return string AppId |
|
39 | - */ |
|
40 | - public function getAppId(): string; |
|
34 | + /** |
|
35 | + * Provides the appId of the plugin |
|
36 | + * |
|
37 | + * @since 19.0.0 |
|
38 | + * @return string AppId |
|
39 | + */ |
|
40 | + public function getAppId(): string; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Fetches all address books for a given principal uri |
|
44 | - * |
|
45 | - * @since 19.0.0 |
|
46 | - * @param string $principalUri E.g. principals/users/user1 |
|
47 | - * @return ExternalAddressBook[] Array of all address books |
|
48 | - */ |
|
49 | - public function fetchAllForAddressBookHome(string $principalUri): array; |
|
42 | + /** |
|
43 | + * Fetches all address books for a given principal uri |
|
44 | + * |
|
45 | + * @since 19.0.0 |
|
46 | + * @param string $principalUri E.g. principals/users/user1 |
|
47 | + * @return ExternalAddressBook[] Array of all address books |
|
48 | + */ |
|
49 | + public function fetchAllForAddressBookHome(string $principalUri): array; |
|
50 | 50 | |
51 | - /** |
|
52 | - * Checks whether plugin has an address book for a given principalUri and URI |
|
53 | - * |
|
54 | - * @since 19.0.0 |
|
55 | - * @param string $principalUri E.g. principals/users/user1 |
|
56 | - * @param string $uri E.g. personal |
|
57 | - * @return bool True if address book for principalUri and URI exists, false otherwise |
|
58 | - */ |
|
59 | - public function hasAddressBookInAddressBookHome(string $principalUri, string $uri): bool; |
|
51 | + /** |
|
52 | + * Checks whether plugin has an address book for a given principalUri and URI |
|
53 | + * |
|
54 | + * @since 19.0.0 |
|
55 | + * @param string $principalUri E.g. principals/users/user1 |
|
56 | + * @param string $uri E.g. personal |
|
57 | + * @return bool True if address book for principalUri and URI exists, false otherwise |
|
58 | + */ |
|
59 | + public function hasAddressBookInAddressBookHome(string $principalUri, string $uri): bool; |
|
60 | 60 | |
61 | - /** |
|
62 | - * Fetches an address book for a given principalUri and URI |
|
63 | - * Returns null if address book does not exist |
|
64 | - * |
|
65 | - * @param string $principalUri E.g. principals/users/user1 |
|
66 | - * @param string $uri E.g. personal |
|
67 | - * |
|
68 | - * @return ExternalAddressBook|null address book if it exists, null otherwise |
|
69 | - *@since 19.0.0 |
|
70 | - */ |
|
71 | - public function getAddressBookInAddressBookHome(string $principalUri, string $uri): ?ExternalAddressBook; |
|
61 | + /** |
|
62 | + * Fetches an address book for a given principalUri and URI |
|
63 | + * Returns null if address book does not exist |
|
64 | + * |
|
65 | + * @param string $principalUri E.g. principals/users/user1 |
|
66 | + * @param string $uri E.g. personal |
|
67 | + * |
|
68 | + * @return ExternalAddressBook|null address book if it exists, null otherwise |
|
69 | + *@since 19.0.0 |
|
70 | + */ |
|
71 | + public function getAddressBookInAddressBookHome(string $principalUri, string $uri): ?ExternalAddressBook; |
|
72 | 72 | |
73 | 73 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | namespace OCA\Files_Trashbin\Sabre; |
29 | 29 | |
30 | 30 | class TrashFolderFile extends AbstractTrashFile { |
31 | - public function get() { |
|
32 | - return $this->data->getStorage()->fopen($this->data->getInternalPath(), 'rb'); |
|
33 | - } |
|
31 | + public function get() { |
|
32 | + return $this->data->getStorage()->fopen($this->data->getInternalPath(), 'rb'); |
|
33 | + } |
|
34 | 34 | } |
@@ -28,11 +28,11 @@ |
||
28 | 28 | namespace OC\Authentication\Token; |
29 | 29 | |
30 | 30 | interface INamedToken extends IToken { |
31 | - /** |
|
32 | - * Set token name |
|
33 | - * |
|
34 | - * @param string $name |
|
35 | - * @return void |
|
36 | - */ |
|
37 | - public function setName(string $name): void; |
|
31 | + /** |
|
32 | + * Set token name |
|
33 | + * |
|
34 | + * @param string $name |
|
35 | + * @return void |
|
36 | + */ |
|
37 | + public function setName(string $name): void; |
|
38 | 38 | } |
@@ -24,12 +24,12 @@ |
||
24 | 24 | namespace OC; |
25 | 25 | |
26 | 26 | class Color { |
27 | - public $r; |
|
28 | - public $g; |
|
29 | - public $b; |
|
30 | - public function __construct($r, $g, $b) { |
|
31 | - $this->r = $r; |
|
32 | - $this->g = $g; |
|
33 | - $this->b = $b; |
|
34 | - } |
|
27 | + public $r; |
|
28 | + public $g; |
|
29 | + public $b; |
|
30 | + public function __construct($r, $g, $b) { |
|
31 | + $this->r = $r; |
|
32 | + $this->g = $g; |
|
33 | + $this->b = $b; |
|
34 | + } |
|
35 | 35 | } |
@@ -34,57 +34,57 @@ |
||
34 | 34 | * @package OC\IntegrityCheck\Helpers |
35 | 35 | */ |
36 | 36 | class FileAccessHelper { |
37 | - /** |
|
38 | - * Wrapper around file_get_contents($filename, $data) |
|
39 | - * |
|
40 | - * @param string $filename |
|
41 | - * @return string|false |
|
42 | - */ |
|
43 | - public function file_get_contents(string $filename) { |
|
44 | - return file_get_contents($filename); |
|
45 | - } |
|
37 | + /** |
|
38 | + * Wrapper around file_get_contents($filename, $data) |
|
39 | + * |
|
40 | + * @param string $filename |
|
41 | + * @return string|false |
|
42 | + */ |
|
43 | + public function file_get_contents(string $filename) { |
|
44 | + return file_get_contents($filename); |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * Wrapper around file_exists($filename) |
|
49 | - * |
|
50 | - * @param string $filename |
|
51 | - * @return bool |
|
52 | - */ |
|
53 | - public function file_exists(string $filename): bool { |
|
54 | - return file_exists($filename); |
|
55 | - } |
|
47 | + /** |
|
48 | + * Wrapper around file_exists($filename) |
|
49 | + * |
|
50 | + * @param string $filename |
|
51 | + * @return bool |
|
52 | + */ |
|
53 | + public function file_exists(string $filename): bool { |
|
54 | + return file_exists($filename); |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * Wrapper around file_put_contents($filename, $data) |
|
59 | - * |
|
60 | - * @param string $filename |
|
61 | - * @param string $data |
|
62 | - * @return int |
|
63 | - * @throws \Exception |
|
64 | - */ |
|
65 | - public function file_put_contents(string $filename, string $data): int { |
|
66 | - $bytesWritten = @file_put_contents($filename, $data); |
|
67 | - if ($bytesWritten === false || $bytesWritten !== \strlen($data)) { |
|
68 | - throw new \Exception('Failed to write into ' . $filename); |
|
69 | - } |
|
70 | - return $bytesWritten; |
|
71 | - } |
|
57 | + /** |
|
58 | + * Wrapper around file_put_contents($filename, $data) |
|
59 | + * |
|
60 | + * @param string $filename |
|
61 | + * @param string $data |
|
62 | + * @return int |
|
63 | + * @throws \Exception |
|
64 | + */ |
|
65 | + public function file_put_contents(string $filename, string $data): int { |
|
66 | + $bytesWritten = @file_put_contents($filename, $data); |
|
67 | + if ($bytesWritten === false || $bytesWritten !== \strlen($data)) { |
|
68 | + throw new \Exception('Failed to write into ' . $filename); |
|
69 | + } |
|
70 | + return $bytesWritten; |
|
71 | + } |
|
72 | 72 | |
73 | - /** |
|
74 | - * @param string $path |
|
75 | - * @return bool |
|
76 | - */ |
|
77 | - public function is_writable(string $path): bool { |
|
78 | - return is_writable($path); |
|
79 | - } |
|
73 | + /** |
|
74 | + * @param string $path |
|
75 | + * @return bool |
|
76 | + */ |
|
77 | + public function is_writable(string $path): bool { |
|
78 | + return is_writable($path); |
|
79 | + } |
|
80 | 80 | |
81 | - /** |
|
82 | - * @param string $path |
|
83 | - * @throws \Exception |
|
84 | - */ |
|
85 | - public function assertDirectoryExists(string $path) { |
|
86 | - if (!is_dir($path)) { |
|
87 | - throw new \Exception('Directory ' . $path . ' does not exist.'); |
|
88 | - } |
|
89 | - } |
|
81 | + /** |
|
82 | + * @param string $path |
|
83 | + * @throws \Exception |
|
84 | + */ |
|
85 | + public function assertDirectoryExists(string $path) { |
|
86 | + if (!is_dir($path)) { |
|
87 | + throw new \Exception('Directory ' . $path . ' does not exist.'); |
|
88 | + } |
|
89 | + } |
|
90 | 90 | } |