@@ -31,9 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | interface ICommentsEventHandler { |
33 | 33 | |
34 | - /** |
|
35 | - * @param CommentsEvent $event |
|
36 | - * @since 11.0.0 |
|
37 | - */ |
|
38 | - public function handle(CommentsEvent $event); |
|
34 | + /** |
|
35 | + * @param CommentsEvent $event |
|
36 | + * @since 11.0.0 |
|
37 | + */ |
|
38 | + public function handle(CommentsEvent $event); |
|
39 | 39 | } |
@@ -32,46 +32,46 @@ |
||
32 | 32 | */ |
33 | 33 | class CommentsEntityEvent extends Event { |
34 | 34 | |
35 | - const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity'; |
|
35 | + const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity'; |
|
36 | 36 | |
37 | - /** @var string */ |
|
38 | - protected $event; |
|
39 | - /** @var \Closure[] */ |
|
40 | - protected $collections; |
|
37 | + /** @var string */ |
|
38 | + protected $event; |
|
39 | + /** @var \Closure[] */ |
|
40 | + protected $collections; |
|
41 | 41 | |
42 | - /** |
|
43 | - * DispatcherEvent constructor. |
|
44 | - * |
|
45 | - * @param string $event |
|
46 | - * @since 9.1.0 |
|
47 | - */ |
|
48 | - public function __construct($event) { |
|
49 | - $this->event = $event; |
|
50 | - $this->collections = []; |
|
51 | - } |
|
42 | + /** |
|
43 | + * DispatcherEvent constructor. |
|
44 | + * |
|
45 | + * @param string $event |
|
46 | + * @since 9.1.0 |
|
47 | + */ |
|
48 | + public function __construct($event) { |
|
49 | + $this->event = $event; |
|
50 | + $this->collections = []; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @param string $name |
|
55 | - * @param \Closure $entityExistsFunction The closure should take one |
|
56 | - * argument, which is the id of the entity, that comments |
|
57 | - * should be handled for. The return should then be bool, |
|
58 | - * depending on whether comments are allowed (true) or not. |
|
59 | - * @throws \OutOfBoundsException when the entity name is already taken |
|
60 | - * @since 9.1.0 |
|
61 | - */ |
|
62 | - public function addEntityCollection($name, \Closure $entityExistsFunction) { |
|
63 | - if (isset($this->collections[$name])) { |
|
64 | - throw new \OutOfBoundsException('Duplicate entity name "' . $name . '"'); |
|
65 | - } |
|
53 | + /** |
|
54 | + * @param string $name |
|
55 | + * @param \Closure $entityExistsFunction The closure should take one |
|
56 | + * argument, which is the id of the entity, that comments |
|
57 | + * should be handled for. The return should then be bool, |
|
58 | + * depending on whether comments are allowed (true) or not. |
|
59 | + * @throws \OutOfBoundsException when the entity name is already taken |
|
60 | + * @since 9.1.0 |
|
61 | + */ |
|
62 | + public function addEntityCollection($name, \Closure $entityExistsFunction) { |
|
63 | + if (isset($this->collections[$name])) { |
|
64 | + throw new \OutOfBoundsException('Duplicate entity name "' . $name . '"'); |
|
65 | + } |
|
66 | 66 | |
67 | - $this->collections[$name] = $entityExistsFunction; |
|
68 | - } |
|
67 | + $this->collections[$name] = $entityExistsFunction; |
|
68 | + } |
|
69 | 69 | |
70 | - /** |
|
71 | - * @return \Closure[] |
|
72 | - * @since 9.1.0 |
|
73 | - */ |
|
74 | - public function getEntityCollections() { |
|
75 | - return $this->collections; |
|
76 | - } |
|
70 | + /** |
|
71 | + * @return \Closure[] |
|
72 | + * @since 9.1.0 |
|
73 | + */ |
|
74 | + public function getEntityCollections() { |
|
75 | + return $this->collections; |
|
76 | + } |
|
77 | 77 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | public function addEntityCollection($name, \Closure $entityExistsFunction) { |
63 | 63 | if (isset($this->collections[$name])) { |
64 | - throw new \OutOfBoundsException('Duplicate entity name "' . $name . '"'); |
|
64 | + throw new \OutOfBoundsException('Duplicate entity name "'.$name.'"'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $this->collections[$name] = $entityExistsFunction; |
@@ -36,19 +36,19 @@ |
||
36 | 36 | */ |
37 | 37 | interface ICommentsManagerFactory { |
38 | 38 | |
39 | - /** |
|
40 | - * Constructor for the comments manager factory |
|
41 | - * |
|
42 | - * @param IServerContainer $serverContainer server container |
|
43 | - * @since 9.0.0 |
|
44 | - */ |
|
45 | - public function __construct(IServerContainer $serverContainer); |
|
39 | + /** |
|
40 | + * Constructor for the comments manager factory |
|
41 | + * |
|
42 | + * @param IServerContainer $serverContainer server container |
|
43 | + * @since 9.0.0 |
|
44 | + */ |
|
45 | + public function __construct(IServerContainer $serverContainer); |
|
46 | 46 | |
47 | - /** |
|
48 | - * creates and returns an instance of the ICommentsManager |
|
49 | - * |
|
50 | - * @return ICommentsManager |
|
51 | - * @since 9.0.0 |
|
52 | - */ |
|
53 | - public function getManager(); |
|
47 | + /** |
|
48 | + * creates and returns an instance of the ICommentsManager |
|
49 | + * |
|
50 | + * @return ICommentsManager |
|
51 | + * @since 9.0.0 |
|
52 | + */ |
|
53 | + public function getManager(); |
|
54 | 54 | } |
@@ -30,51 +30,51 @@ |
||
30 | 30 | * @since 8.0.0 |
31 | 31 | */ |
32 | 32 | interface ICertificate { |
33 | - /** |
|
34 | - * @return string |
|
35 | - * @since 8.0.0 |
|
36 | - */ |
|
37 | - public function getName(); |
|
33 | + /** |
|
34 | + * @return string |
|
35 | + * @since 8.0.0 |
|
36 | + */ |
|
37 | + public function getName(); |
|
38 | 38 | |
39 | - /** |
|
40 | - * @return string |
|
41 | - * @since 8.0.0 |
|
42 | - */ |
|
43 | - public function getCommonName(); |
|
39 | + /** |
|
40 | + * @return string |
|
41 | + * @since 8.0.0 |
|
42 | + */ |
|
43 | + public function getCommonName(); |
|
44 | 44 | |
45 | - /** |
|
46 | - * @return string |
|
47 | - * @since 8.0.0 |
|
48 | - */ |
|
49 | - public function getOrganization(); |
|
45 | + /** |
|
46 | + * @return string |
|
47 | + * @since 8.0.0 |
|
48 | + */ |
|
49 | + public function getOrganization(); |
|
50 | 50 | |
51 | - /** |
|
52 | - * @return \DateTime |
|
53 | - * @since 8.0.0 |
|
54 | - */ |
|
55 | - public function getIssueDate(); |
|
51 | + /** |
|
52 | + * @return \DateTime |
|
53 | + * @since 8.0.0 |
|
54 | + */ |
|
55 | + public function getIssueDate(); |
|
56 | 56 | |
57 | - /** |
|
58 | - * @return \DateTime |
|
59 | - * @since 8.0.0 |
|
60 | - */ |
|
61 | - public function getExpireDate(); |
|
57 | + /** |
|
58 | + * @return \DateTime |
|
59 | + * @since 8.0.0 |
|
60 | + */ |
|
61 | + public function getExpireDate(); |
|
62 | 62 | |
63 | - /** |
|
64 | - * @return bool |
|
65 | - * @since 8.0.0 |
|
66 | - */ |
|
67 | - public function isExpired(); |
|
63 | + /** |
|
64 | + * @return bool |
|
65 | + * @since 8.0.0 |
|
66 | + */ |
|
67 | + public function isExpired(); |
|
68 | 68 | |
69 | - /** |
|
70 | - * @return string |
|
71 | - * @since 8.0.0 |
|
72 | - */ |
|
73 | - public function getIssuerName(); |
|
69 | + /** |
|
70 | + * @return string |
|
71 | + * @since 8.0.0 |
|
72 | + */ |
|
73 | + public function getIssuerName(); |
|
74 | 74 | |
75 | - /** |
|
76 | - * @return string |
|
77 | - * @since 8.0.0 |
|
78 | - */ |
|
79 | - public function getIssuerOrganization(); |
|
75 | + /** |
|
76 | + * @return string |
|
77 | + * @since 8.0.0 |
|
78 | + */ |
|
79 | + public function getIssuerOrganization(); |
|
80 | 80 | } |
@@ -29,78 +29,78 @@ |
||
29 | 29 | * @since 9.0.0 |
30 | 30 | */ |
31 | 31 | interface IAction { |
32 | - /** |
|
33 | - * @param string $label |
|
34 | - * @return $this |
|
35 | - * @throws \InvalidArgumentException if the label is invalid |
|
36 | - * @since 9.0.0 |
|
37 | - */ |
|
38 | - public function setLabel($label); |
|
32 | + /** |
|
33 | + * @param string $label |
|
34 | + * @return $this |
|
35 | + * @throws \InvalidArgumentException if the label is invalid |
|
36 | + * @since 9.0.0 |
|
37 | + */ |
|
38 | + public function setLabel($label); |
|
39 | 39 | |
40 | - /** |
|
41 | - * @return string |
|
42 | - * @since 9.0.0 |
|
43 | - */ |
|
44 | - public function getLabel(); |
|
40 | + /** |
|
41 | + * @return string |
|
42 | + * @since 9.0.0 |
|
43 | + */ |
|
44 | + public function getLabel(); |
|
45 | 45 | |
46 | - /** |
|
47 | - * @param string $label |
|
48 | - * @return $this |
|
49 | - * @throws \InvalidArgumentException if the label is invalid |
|
50 | - * @since 9.0.0 |
|
51 | - */ |
|
52 | - public function setParsedLabel($label); |
|
46 | + /** |
|
47 | + * @param string $label |
|
48 | + * @return $this |
|
49 | + * @throws \InvalidArgumentException if the label is invalid |
|
50 | + * @since 9.0.0 |
|
51 | + */ |
|
52 | + public function setParsedLabel($label); |
|
53 | 53 | |
54 | - /** |
|
55 | - * @return string |
|
56 | - * @since 9.0.0 |
|
57 | - */ |
|
58 | - public function getParsedLabel(); |
|
54 | + /** |
|
55 | + * @return string |
|
56 | + * @since 9.0.0 |
|
57 | + */ |
|
58 | + public function getParsedLabel(); |
|
59 | 59 | |
60 | - /** |
|
61 | - * @param $primary bool |
|
62 | - * @return $this |
|
63 | - * @throws \InvalidArgumentException if $primary is invalid |
|
64 | - * @since 9.0.0 |
|
65 | - */ |
|
66 | - public function setPrimary($primary); |
|
60 | + /** |
|
61 | + * @param $primary bool |
|
62 | + * @return $this |
|
63 | + * @throws \InvalidArgumentException if $primary is invalid |
|
64 | + * @since 9.0.0 |
|
65 | + */ |
|
66 | + public function setPrimary($primary); |
|
67 | 67 | |
68 | - /** |
|
69 | - * @return bool |
|
70 | - * @since 9.0.0 |
|
71 | - */ |
|
72 | - public function isPrimary(); |
|
68 | + /** |
|
69 | + * @return bool |
|
70 | + * @since 9.0.0 |
|
71 | + */ |
|
72 | + public function isPrimary(); |
|
73 | 73 | |
74 | - /** |
|
75 | - * @param string $link |
|
76 | - * @param string $requestType |
|
77 | - * @return $this |
|
78 | - * @throws \InvalidArgumentException if the link is invalid |
|
79 | - * @since 9.0.0 |
|
80 | - */ |
|
81 | - public function setLink($link, $requestType); |
|
74 | + /** |
|
75 | + * @param string $link |
|
76 | + * @param string $requestType |
|
77 | + * @return $this |
|
78 | + * @throws \InvalidArgumentException if the link is invalid |
|
79 | + * @since 9.0.0 |
|
80 | + */ |
|
81 | + public function setLink($link, $requestType); |
|
82 | 82 | |
83 | - /** |
|
84 | - * @return string |
|
85 | - * @since 9.0.0 |
|
86 | - */ |
|
87 | - public function getLink(); |
|
83 | + /** |
|
84 | + * @return string |
|
85 | + * @since 9.0.0 |
|
86 | + */ |
|
87 | + public function getLink(); |
|
88 | 88 | |
89 | - /** |
|
90 | - * @return string |
|
91 | - * @since 9.0.0 |
|
92 | - */ |
|
93 | - public function getRequestType(); |
|
89 | + /** |
|
90 | + * @return string |
|
91 | + * @since 9.0.0 |
|
92 | + */ |
|
93 | + public function getRequestType(); |
|
94 | 94 | |
95 | - /** |
|
96 | - * @return bool |
|
97 | - * @since 9.0.0 |
|
98 | - */ |
|
99 | - public function isValid(); |
|
95 | + /** |
|
96 | + * @return bool |
|
97 | + * @since 9.0.0 |
|
98 | + */ |
|
99 | + public function isValid(); |
|
100 | 100 | |
101 | - /** |
|
102 | - * @return bool |
|
103 | - * @since 9.0.0 |
|
104 | - */ |
|
105 | - public function isValidParsed(); |
|
101 | + /** |
|
102 | + * @return bool |
|
103 | + * @since 9.0.0 |
|
104 | + */ |
|
105 | + public function isValidParsed(); |
|
106 | 106 | } |
@@ -29,23 +29,23 @@ |
||
29 | 29 | * @since 9.0.0 |
30 | 30 | */ |
31 | 31 | interface IApp { |
32 | - /** |
|
33 | - * @param INotification $notification |
|
34 | - * @throws \InvalidArgumentException When the notification is not valid |
|
35 | - * @since 9.0.0 |
|
36 | - */ |
|
37 | - public function notify(INotification $notification); |
|
32 | + /** |
|
33 | + * @param INotification $notification |
|
34 | + * @throws \InvalidArgumentException When the notification is not valid |
|
35 | + * @since 9.0.0 |
|
36 | + */ |
|
37 | + public function notify(INotification $notification); |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param INotification $notification |
|
41 | - * @since 9.0.0 |
|
42 | - */ |
|
43 | - public function markProcessed(INotification $notification); |
|
39 | + /** |
|
40 | + * @param INotification $notification |
|
41 | + * @since 9.0.0 |
|
42 | + */ |
|
43 | + public function markProcessed(INotification $notification); |
|
44 | 44 | |
45 | - /** |
|
46 | - * @param INotification $notification |
|
47 | - * @return int |
|
48 | - * @since 9.0.0 |
|
49 | - */ |
|
50 | - public function getCount(INotification $notification); |
|
45 | + /** |
|
46 | + * @param INotification $notification |
|
47 | + * @return int |
|
48 | + * @since 9.0.0 |
|
49 | + */ |
|
50 | + public function getCount(INotification $notification); |
|
51 | 51 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | * @since 9.0.0 |
30 | 30 | */ |
31 | 31 | interface INotifier { |
32 | - /** |
|
33 | - * @param INotification $notification |
|
34 | - * @param string $languageCode The code of the language that should be used to prepare the notification |
|
35 | - * @return INotification |
|
36 | - * @throws \InvalidArgumentException When the notification was not prepared by a notifier |
|
37 | - * @since 9.0.0 |
|
38 | - */ |
|
39 | - public function prepare(INotification $notification, $languageCode); |
|
32 | + /** |
|
33 | + * @param INotification $notification |
|
34 | + * @param string $languageCode The code of the language that should be used to prepare the notification |
|
35 | + * @return INotification |
|
36 | + * @throws \InvalidArgumentException When the notification was not prepared by a notifier |
|
37 | + * @since 9.0.0 |
|
38 | + */ |
|
39 | + public function prepare(INotification $notification, $languageCode); |
|
40 | 40 | } |
@@ -41,39 +41,39 @@ |
||
41 | 41 | */ |
42 | 42 | class API { |
43 | 43 | |
44 | - /** |
|
45 | - * API authentication levels |
|
46 | - * @since 8.1.0 |
|
47 | - */ |
|
48 | - const GUEST_AUTH = 0; |
|
49 | - const USER_AUTH = 1; |
|
50 | - const SUBADMIN_AUTH = 2; |
|
51 | - const ADMIN_AUTH = 3; |
|
44 | + /** |
|
45 | + * API authentication levels |
|
46 | + * @since 8.1.0 |
|
47 | + */ |
|
48 | + const GUEST_AUTH = 0; |
|
49 | + const USER_AUTH = 1; |
|
50 | + const SUBADMIN_AUTH = 2; |
|
51 | + const ADMIN_AUTH = 3; |
|
52 | 52 | |
53 | - /** |
|
54 | - * API Response Codes |
|
55 | - * @since 8.1.0 |
|
56 | - */ |
|
57 | - const RESPOND_UNAUTHORISED = 997; |
|
58 | - const RESPOND_SERVER_ERROR = 996; |
|
59 | - const RESPOND_NOT_FOUND = 998; |
|
60 | - const RESPOND_UNKNOWN_ERROR = 999; |
|
53 | + /** |
|
54 | + * API Response Codes |
|
55 | + * @since 8.1.0 |
|
56 | + */ |
|
57 | + const RESPOND_UNAUTHORISED = 997; |
|
58 | + const RESPOND_SERVER_ERROR = 996; |
|
59 | + const RESPOND_NOT_FOUND = 998; |
|
60 | + const RESPOND_UNKNOWN_ERROR = 999; |
|
61 | 61 | |
62 | - /** |
|
63 | - * registers an api call |
|
64 | - * @param string $method the http method |
|
65 | - * @param string $url the url to match |
|
66 | - * @param callable $action the function to run |
|
67 | - * @param string $app the id of the app registering the call |
|
68 | - * @param int $authLevel the level of authentication required for the call (See `self::*_AUTH` constants) |
|
69 | - * @param array $defaults |
|
70 | - * @param array $requirements |
|
71 | - * @since 5.0.0 |
|
72 | - * @deprecated 9.1.0 Use the AppFramework |
|
73 | - */ |
|
74 | - public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, |
|
75 | - $defaults = array(), $requirements = array()){ |
|
76 | - \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); |
|
77 | - } |
|
62 | + /** |
|
63 | + * registers an api call |
|
64 | + * @param string $method the http method |
|
65 | + * @param string $url the url to match |
|
66 | + * @param callable $action the function to run |
|
67 | + * @param string $app the id of the app registering the call |
|
68 | + * @param int $authLevel the level of authentication required for the call (See `self::*_AUTH` constants) |
|
69 | + * @param array $defaults |
|
70 | + * @param array $requirements |
|
71 | + * @since 5.0.0 |
|
72 | + * @deprecated 9.1.0 Use the AppFramework |
|
73 | + */ |
|
74 | + public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, |
|
75 | + $defaults = array(), $requirements = array()){ |
|
76 | + \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); |
|
77 | + } |
|
78 | 78 | |
79 | 79 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | * @deprecated 9.1.0 Use the AppFramework |
73 | 73 | */ |
74 | 74 | public static function register($method, $url, $action, $app, $authLevel = self::USER_AUTH, |
75 | - $defaults = array(), $requirements = array()){ |
|
75 | + $defaults = array(), $requirements = array()) { |
|
76 | 76 | \OC_API::register($method, $url, $action, $app, $authLevel, $defaults, $requirements); |
77 | 77 | } |
78 | 78 |
@@ -38,11 +38,11 @@ |
||
38 | 38 | */ |
39 | 39 | interface IUserBackend { |
40 | 40 | |
41 | - /** |
|
42 | - * Backend name to be shown in user management |
|
43 | - * @return string the name of the backend to be shown |
|
44 | - * @since 8.0.0 |
|
45 | - */ |
|
46 | - public function getBackendName(); |
|
41 | + /** |
|
42 | + * Backend name to be shown in user management |
|
43 | + * @return string the name of the backend to be shown |
|
44 | + * @since 8.0.0 |
|
45 | + */ |
|
46 | + public function getBackendName(); |
|
47 | 47 | |
48 | 48 | } |