@@ -25,7 +25,7 @@ |
||
25 | 25 | use OCP\AppFramework\Http; |
26 | 26 | |
27 | 27 | class RateLimitExceededException extends SecurityException { |
28 | - public function __construct() { |
|
29 | - parent::__construct('Rate limit exceeded', Http::STATUS_TOO_MANY_REQUESTS); |
|
30 | - } |
|
28 | + public function __construct() { |
|
29 | + parent::__construct('Rate limit exceeded', Http::STATUS_TOO_MANY_REQUESTS); |
|
30 | + } |
|
31 | 31 | } |
@@ -35,55 +35,55 @@ |
||
35 | 35 | * @since 8.0.0 |
36 | 36 | */ |
37 | 37 | interface IEventLogger { |
38 | - /** |
|
39 | - * Mark the start of an event setting its ID $id and providing event description $description. |
|
40 | - * |
|
41 | - * @param string $id |
|
42 | - * @param string $description |
|
43 | - * @since 8.0.0 |
|
44 | - */ |
|
45 | - public function start($id, $description); |
|
38 | + /** |
|
39 | + * Mark the start of an event setting its ID $id and providing event description $description. |
|
40 | + * |
|
41 | + * @param string $id |
|
42 | + * @param string $description |
|
43 | + * @since 8.0.0 |
|
44 | + */ |
|
45 | + public function start($id, $description); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Mark the end of an event with specific ID $id, marked by start() method. |
|
49 | - * Ending event should store \OCP\Diagnostics\IEvent to |
|
50 | - * be returned with getEvents() method. |
|
51 | - * |
|
52 | - * @param string $id |
|
53 | - * @since 8.0.0 |
|
54 | - */ |
|
55 | - public function end($id); |
|
47 | + /** |
|
48 | + * Mark the end of an event with specific ID $id, marked by start() method. |
|
49 | + * Ending event should store \OCP\Diagnostics\IEvent to |
|
50 | + * be returned with getEvents() method. |
|
51 | + * |
|
52 | + * @param string $id |
|
53 | + * @since 8.0.0 |
|
54 | + */ |
|
55 | + public function end($id); |
|
56 | 56 | |
57 | - /** |
|
58 | - * Mark the start and the end of an event with specific ID $id and description $description, |
|
59 | - * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
60 | - * Logging event should store \OCP\Diagnostics\IEvent to |
|
61 | - * be returned with getEvents() method. |
|
62 | - * |
|
63 | - * @param string $id |
|
64 | - * @param string $description |
|
65 | - * @param float $start |
|
66 | - * @param float $end |
|
67 | - * @since 8.0.0 |
|
68 | - */ |
|
69 | - public function log($id, $description, $start, $end); |
|
57 | + /** |
|
58 | + * Mark the start and the end of an event with specific ID $id and description $description, |
|
59 | + * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
60 | + * Logging event should store \OCP\Diagnostics\IEvent to |
|
61 | + * be returned with getEvents() method. |
|
62 | + * |
|
63 | + * @param string $id |
|
64 | + * @param string $description |
|
65 | + * @param float $start |
|
66 | + * @param float $end |
|
67 | + * @since 8.0.0 |
|
68 | + */ |
|
69 | + public function log($id, $description, $start, $end); |
|
70 | 70 | |
71 | - /** |
|
72 | - * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
73 | - * start()/end() or log() methods |
|
74 | - * |
|
75 | - * @return \OCP\Diagnostics\IEvent[] |
|
76 | - * @since 8.0.0 |
|
77 | - */ |
|
78 | - public function getEvents(); |
|
71 | + /** |
|
72 | + * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
73 | + * start()/end() or log() methods |
|
74 | + * |
|
75 | + * @return \OCP\Diagnostics\IEvent[] |
|
76 | + * @since 8.0.0 |
|
77 | + */ |
|
78 | + public function getEvents(); |
|
79 | 79 | |
80 | - /** |
|
81 | - * Activate the module for the duration of the request. Deactivated module |
|
82 | - * does not create and store \OCP\Diagnostics\IEvent objects. |
|
83 | - * Only activated module should create and store objects to be |
|
84 | - * returned with getEvents() call. |
|
85 | - * |
|
86 | - * @since 12.0.0 |
|
87 | - */ |
|
88 | - public function activate(); |
|
80 | + /** |
|
81 | + * Activate the module for the duration of the request. Deactivated module |
|
82 | + * does not create and store \OCP\Diagnostics\IEvent objects. |
|
83 | + * Only activated module should create and store objects to be |
|
84 | + * returned with getEvents() call. |
|
85 | + * |
|
86 | + * @since 12.0.0 |
|
87 | + */ |
|
88 | + public function activate(); |
|
89 | 89 | } |
@@ -30,38 +30,38 @@ |
||
30 | 30 | * @since 8.0.0 |
31 | 31 | */ |
32 | 32 | interface IQuery { |
33 | - /** |
|
34 | - * @return string |
|
35 | - * @since 8.0.0 |
|
36 | - */ |
|
37 | - public function getSql(); |
|
33 | + /** |
|
34 | + * @return string |
|
35 | + * @since 8.0.0 |
|
36 | + */ |
|
37 | + public function getSql(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * @return array |
|
41 | - * @since 8.0.0 |
|
42 | - */ |
|
43 | - public function getParams(); |
|
39 | + /** |
|
40 | + * @return array |
|
41 | + * @since 8.0.0 |
|
42 | + */ |
|
43 | + public function getParams(); |
|
44 | 44 | |
45 | - /** |
|
46 | - * @return float |
|
47 | - * @since 8.0.0 |
|
48 | - */ |
|
49 | - public function getDuration(); |
|
45 | + /** |
|
46 | + * @return float |
|
47 | + * @since 8.0.0 |
|
48 | + */ |
|
49 | + public function getDuration(); |
|
50 | 50 | |
51 | - /** |
|
52 | - * @return float |
|
53 | - * @since 11.0.0 |
|
54 | - */ |
|
55 | - public function getStartTime(); |
|
51 | + /** |
|
52 | + * @return float |
|
53 | + * @since 11.0.0 |
|
54 | + */ |
|
55 | + public function getStartTime(); |
|
56 | 56 | |
57 | - /** |
|
58 | - * @return array |
|
59 | - * @since 11.0.0 |
|
60 | - */ |
|
61 | - public function getStacktrace(); |
|
62 | - /** |
|
63 | - * @return array |
|
64 | - * @since 12.0.0 |
|
65 | - */ |
|
66 | - public function getStart(); |
|
57 | + /** |
|
58 | + * @return array |
|
59 | + * @since 11.0.0 |
|
60 | + */ |
|
61 | + public function getStacktrace(); |
|
62 | + /** |
|
63 | + * @return array |
|
64 | + * @since 12.0.0 |
|
65 | + */ |
|
66 | + public function getStart(); |
|
67 | 67 | } |
@@ -26,65 +26,65 @@ |
||
26 | 26 | use OCP\Diagnostics\IQuery; |
27 | 27 | |
28 | 28 | class Query implements IQuery { |
29 | - private $sql; |
|
29 | + private $sql; |
|
30 | 30 | |
31 | - private $params; |
|
31 | + private $params; |
|
32 | 32 | |
33 | - private $start; |
|
33 | + private $start; |
|
34 | 34 | |
35 | - private $end; |
|
35 | + private $end; |
|
36 | 36 | |
37 | - private $stack; |
|
37 | + private $stack; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param string $sql |
|
41 | - * @param array $params |
|
42 | - * @param int $start |
|
43 | - */ |
|
44 | - public function __construct($sql, $params, $start, array $stack) { |
|
45 | - $this->sql = $sql; |
|
46 | - $this->params = $params; |
|
47 | - $this->start = $start; |
|
48 | - $this->stack = $stack; |
|
49 | - } |
|
39 | + /** |
|
40 | + * @param string $sql |
|
41 | + * @param array $params |
|
42 | + * @param int $start |
|
43 | + */ |
|
44 | + public function __construct($sql, $params, $start, array $stack) { |
|
45 | + $this->sql = $sql; |
|
46 | + $this->params = $params; |
|
47 | + $this->start = $start; |
|
48 | + $this->stack = $stack; |
|
49 | + } |
|
50 | 50 | |
51 | - public function end($time) { |
|
52 | - $this->end = $time; |
|
53 | - } |
|
51 | + public function end($time) { |
|
52 | + $this->end = $time; |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * @return array |
|
57 | - */ |
|
58 | - public function getParams() { |
|
59 | - return $this->params; |
|
60 | - } |
|
55 | + /** |
|
56 | + * @return array |
|
57 | + */ |
|
58 | + public function getParams() { |
|
59 | + return $this->params; |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * @return string |
|
64 | - */ |
|
65 | - public function getSql() { |
|
66 | - return $this->sql; |
|
67 | - } |
|
62 | + /** |
|
63 | + * @return string |
|
64 | + */ |
|
65 | + public function getSql() { |
|
66 | + return $this->sql; |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * @return float |
|
71 | - */ |
|
72 | - public function getStart() { |
|
73 | - return $this->start; |
|
74 | - } |
|
69 | + /** |
|
70 | + * @return float |
|
71 | + */ |
|
72 | + public function getStart() { |
|
73 | + return $this->start; |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * @return float |
|
78 | - */ |
|
79 | - public function getDuration() { |
|
80 | - return $this->end - $this->start; |
|
81 | - } |
|
76 | + /** |
|
77 | + * @return float |
|
78 | + */ |
|
79 | + public function getDuration() { |
|
80 | + return $this->end - $this->start; |
|
81 | + } |
|
82 | 82 | |
83 | - public function getStartTime() { |
|
84 | - return $this->start; |
|
85 | - } |
|
83 | + public function getStartTime() { |
|
84 | + return $this->start; |
|
85 | + } |
|
86 | 86 | |
87 | - public function getStacktrace() { |
|
88 | - return $this->stack; |
|
89 | - } |
|
87 | + public function getStacktrace() { |
|
88 | + return $this->stack; |
|
89 | + } |
|
90 | 90 | } |
@@ -24,25 +24,25 @@ |
||
24 | 24 | namespace OC\Files\Cache\Wrapper; |
25 | 25 | |
26 | 26 | class CachePermissionsMask extends CacheWrapper { |
27 | - /** |
|
28 | - * @var int |
|
29 | - */ |
|
30 | - protected $mask; |
|
27 | + /** |
|
28 | + * @var int |
|
29 | + */ |
|
30 | + protected $mask; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param \OCP\Files\Cache\ICache $cache |
|
34 | - * @param int $mask |
|
35 | - */ |
|
36 | - public function __construct($cache, $mask) { |
|
37 | - parent::__construct($cache); |
|
38 | - $this->mask = $mask; |
|
39 | - } |
|
32 | + /** |
|
33 | + * @param \OCP\Files\Cache\ICache $cache |
|
34 | + * @param int $mask |
|
35 | + */ |
|
36 | + public function __construct($cache, $mask) { |
|
37 | + parent::__construct($cache); |
|
38 | + $this->mask = $mask; |
|
39 | + } |
|
40 | 40 | |
41 | - protected function formatCacheEntry($entry) { |
|
42 | - if (isset($entry['permissions'])) { |
|
43 | - $entry['scan_permissions'] = $entry['permissions']; |
|
44 | - $entry['permissions'] &= $this->mask; |
|
45 | - } |
|
46 | - return $entry; |
|
47 | - } |
|
41 | + protected function formatCacheEntry($entry) { |
|
42 | + if (isset($entry['permissions'])) { |
|
43 | + $entry['scan_permissions'] = $entry['permissions']; |
|
44 | + $entry['permissions'] &= $this->mask; |
|
45 | + } |
|
46 | + return $entry; |
|
47 | + } |
|
48 | 48 | } |
@@ -33,14 +33,14 @@ |
||
33 | 33 | * @see \Sabre\DAV\Server |
34 | 34 | */ |
35 | 35 | class Server extends \Sabre\DAV\Server { |
36 | - /** @var CachingTree $tree */ |
|
36 | + /** @var CachingTree $tree */ |
|
37 | 37 | |
38 | - /** |
|
39 | - * @see \Sabre\DAV\Server |
|
40 | - */ |
|
41 | - public function __construct($treeOrNode = null) { |
|
42 | - parent::__construct($treeOrNode); |
|
43 | - self::$exposeVersion = false; |
|
44 | - $this->enablePropfindDepthInfinity = true; |
|
45 | - } |
|
38 | + /** |
|
39 | + * @see \Sabre\DAV\Server |
|
40 | + */ |
|
41 | + public function __construct($treeOrNode = null) { |
|
42 | + parent::__construct($treeOrNode); |
|
43 | + self::$exposeVersion = false; |
|
44 | + $this->enablePropfindDepthInfinity = true; |
|
45 | + } |
|
46 | 46 | } |
@@ -29,58 +29,58 @@ |
||
29 | 29 | use OCP\Settings\IIconSection; |
30 | 30 | |
31 | 31 | class PersonalSection implements IIconSection { |
32 | - /** @var IURLGenerator */ |
|
33 | - private $urlGenerator; |
|
34 | - /** @var IL10N */ |
|
35 | - private $l; |
|
32 | + /** @var IURLGenerator */ |
|
33 | + private $urlGenerator; |
|
34 | + /** @var IL10N */ |
|
35 | + private $l; |
|
36 | 36 | |
37 | - public function __construct(IURLGenerator $urlGenerator, IL10N $l) { |
|
38 | - $this->urlGenerator = $urlGenerator; |
|
39 | - $this->l = $l; |
|
40 | - } |
|
37 | + public function __construct(IURLGenerator $urlGenerator, IL10N $l) { |
|
38 | + $this->urlGenerator = $urlGenerator; |
|
39 | + $this->l = $l; |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * returns the relative path to an 16*16 icon describing the section. |
|
44 | - * e.g. '/core/img/places/files.svg' |
|
45 | - * |
|
46 | - * @returns string |
|
47 | - * @since 13.0.0 |
|
48 | - */ |
|
49 | - public function getIcon() { |
|
50 | - return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
51 | - } |
|
42 | + /** |
|
43 | + * returns the relative path to an 16*16 icon describing the section. |
|
44 | + * e.g. '/core/img/places/files.svg' |
|
45 | + * |
|
46 | + * @returns string |
|
47 | + * @since 13.0.0 |
|
48 | + */ |
|
49 | + public function getIcon() { |
|
50 | + return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * returns the ID of the section. It is supposed to be a lower case string, |
|
55 | - * e.g. 'ldap' |
|
56 | - * |
|
57 | - * @returns string |
|
58 | - * @since 9.1 |
|
59 | - */ |
|
60 | - public function getID() { |
|
61 | - return 'sharing'; |
|
62 | - } |
|
53 | + /** |
|
54 | + * returns the ID of the section. It is supposed to be a lower case string, |
|
55 | + * e.g. 'ldap' |
|
56 | + * |
|
57 | + * @returns string |
|
58 | + * @since 9.1 |
|
59 | + */ |
|
60 | + public function getID() { |
|
61 | + return 'sharing'; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * returns the translated name as it should be displayed, e.g. 'LDAP / AD |
|
66 | - * integration'. Use the L10N service to translate it. |
|
67 | - * |
|
68 | - * @return string |
|
69 | - * @since 9.1 |
|
70 | - */ |
|
71 | - public function getName() { |
|
72 | - return $this->l->t('Sharing'); |
|
73 | - } |
|
64 | + /** |
|
65 | + * returns the translated name as it should be displayed, e.g. 'LDAP / AD |
|
66 | + * integration'. Use the L10N service to translate it. |
|
67 | + * |
|
68 | + * @return string |
|
69 | + * @since 9.1 |
|
70 | + */ |
|
71 | + public function getName() { |
|
72 | + return $this->l->t('Sharing'); |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * @return int whether the form should be rather on the top or bottom of |
|
77 | - * the settings navigation. The sections are arranged in ascending order of |
|
78 | - * the priority values. It is required to return a value between 0 and 99. |
|
79 | - * |
|
80 | - * E.g.: 70 |
|
81 | - * @since 9.1 |
|
82 | - */ |
|
83 | - public function getPriority() { |
|
84 | - return 15; |
|
85 | - } |
|
75 | + /** |
|
76 | + * @return int whether the form should be rather on the top or bottom of |
|
77 | + * the settings navigation. The sections are arranged in ascending order of |
|
78 | + * the priority values. It is required to return a value between 0 and 99. |
|
79 | + * |
|
80 | + * E.g.: 70 |
|
81 | + * @since 9.1 |
|
82 | + */ |
|
83 | + public function getPriority() { |
|
84 | + return 15; |
|
85 | + } |
|
86 | 86 | } |
@@ -29,25 +29,25 @@ |
||
29 | 29 | use OCP\IUserSession; |
30 | 30 | |
31 | 31 | class PersonalSection extends Section { |
32 | - /** @var IUserSession */ |
|
33 | - private $userSession; |
|
32 | + /** @var IUserSession */ |
|
33 | + private $userSession; |
|
34 | 34 | |
35 | - /** @var UserGlobalStoragesService */ |
|
36 | - private $userGlobalStoragesService; |
|
35 | + /** @var UserGlobalStoragesService */ |
|
36 | + private $userGlobalStoragesService; |
|
37 | 37 | |
38 | - /** @var BackendService */ |
|
39 | - private $backendService; |
|
38 | + /** @var BackendService */ |
|
39 | + private $backendService; |
|
40 | 40 | |
41 | - public function __construct( |
|
42 | - IURLGenerator $url, |
|
43 | - IL10N $l, |
|
44 | - IUserSession $userSession, |
|
45 | - UserGlobalStoragesService $userGlobalStoragesService, |
|
46 | - BackendService $backendService |
|
47 | - ) { |
|
48 | - parent::__construct($url, $l); |
|
49 | - $this->userSession = $userSession; |
|
50 | - $this->userGlobalStoragesService = $userGlobalStoragesService; |
|
51 | - $this->backendService = $backendService; |
|
52 | - } |
|
41 | + public function __construct( |
|
42 | + IURLGenerator $url, |
|
43 | + IL10N $l, |
|
44 | + IUserSession $userSession, |
|
45 | + UserGlobalStoragesService $userGlobalStoragesService, |
|
46 | + BackendService $backendService |
|
47 | + ) { |
|
48 | + parent::__construct($url, $l); |
|
49 | + $this->userSession = $userSession; |
|
50 | + $this->userGlobalStoragesService = $userGlobalStoragesService; |
|
51 | + $this->backendService = $backendService; |
|
52 | + } |
|
53 | 53 | } |
@@ -29,39 +29,39 @@ |
||
29 | 29 | |
30 | 30 | class ConfigController extends OCSController { |
31 | 31 | |
32 | - /** @var IConfig */ |
|
33 | - private $config; |
|
32 | + /** @var IConfig */ |
|
33 | + private $config; |
|
34 | 34 | |
35 | - /** |
|
36 | - * @param string $appName |
|
37 | - * @param IRequest $request |
|
38 | - * @param IConfig $config |
|
39 | - */ |
|
40 | - public function __construct($appName, |
|
41 | - IRequest $request, |
|
42 | - IConfig $config) { |
|
43 | - parent::__construct($appName, $request); |
|
44 | - $this->config = $config; |
|
45 | - } |
|
35 | + /** |
|
36 | + * @param string $appName |
|
37 | + * @param IRequest $request |
|
38 | + * @param IConfig $config |
|
39 | + */ |
|
40 | + public function __construct($appName, |
|
41 | + IRequest $request, |
|
42 | + IConfig $config) { |
|
43 | + parent::__construct($appName, $request); |
|
44 | + $this->config = $config; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @param string $appid |
|
49 | - * @param string $configkey |
|
50 | - * @param string $value |
|
51 | - * @return DataResponse |
|
52 | - */ |
|
53 | - public function setAppValue($appid, $configkey, $value) { |
|
54 | - $this->config->setAppValue($appid, $configkey, $value); |
|
55 | - return new DataResponse(); |
|
56 | - } |
|
47 | + /** |
|
48 | + * @param string $appid |
|
49 | + * @param string $configkey |
|
50 | + * @param string $value |
|
51 | + * @return DataResponse |
|
52 | + */ |
|
53 | + public function setAppValue($appid, $configkey, $value) { |
|
54 | + $this->config->setAppValue($appid, $configkey, $value); |
|
55 | + return new DataResponse(); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * @param string $appid |
|
60 | - * @param string $configkey |
|
61 | - * @return DataResponse |
|
62 | - */ |
|
63 | - public function deleteAppValue($appid, $configkey) { |
|
64 | - $this->config->deleteAppValue($appid, $configkey); |
|
65 | - return new DataResponse(); |
|
66 | - } |
|
58 | + /** |
|
59 | + * @param string $appid |
|
60 | + * @param string $configkey |
|
61 | + * @return DataResponse |
|
62 | + */ |
|
63 | + public function deleteAppValue($appid, $configkey) { |
|
64 | + $this->config->deleteAppValue($appid, $configkey); |
|
65 | + return new DataResponse(); |
|
66 | + } |
|
67 | 67 | } |