@@ -31,18 +31,18 @@ |
||
31 | 31 | */ |
32 | 32 | class GenericShareException extends HintException { |
33 | 33 | |
34 | - /** |
|
35 | - * @param string $message |
|
36 | - * @param string $hint |
|
37 | - * @param int $code |
|
38 | - * @param \Exception|null $previous |
|
39 | - * @since 9.0.0 |
|
40 | - */ |
|
41 | - public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { |
|
42 | - if (empty($message)) { |
|
43 | - $message = 'There was an error retrieving the share. Maybe the link is wrong, it was unshared, or it was deleted.'; |
|
44 | - } |
|
45 | - parent::__construct($message, $hint, $code, $previous); |
|
46 | - } |
|
34 | + /** |
|
35 | + * @param string $message |
|
36 | + * @param string $hint |
|
37 | + * @param int $code |
|
38 | + * @param \Exception|null $previous |
|
39 | + * @since 9.0.0 |
|
40 | + */ |
|
41 | + public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { |
|
42 | + if (empty($message)) { |
|
43 | + $message = 'There was an error retrieving the share. Maybe the link is wrong, it was unshared, or it was deleted.'; |
|
44 | + } |
|
45 | + parent::__construct($message, $hint, $code, $previous); |
|
46 | + } |
|
47 | 47 | |
48 | 48 | } |
@@ -35,18 +35,18 @@ |
||
35 | 35 | */ |
36 | 36 | class GenericEncryptionException extends HintException { |
37 | 37 | |
38 | - /** |
|
39 | - * @param string $message |
|
40 | - * @param string $hint |
|
41 | - * @param int $code |
|
42 | - * @param \Exception|null $previous |
|
43 | - * @since 8.1.0 |
|
44 | - */ |
|
45 | - public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { |
|
46 | - if (empty($message)) { |
|
47 | - $message = 'Unspecified encryption exception'; |
|
48 | - } |
|
49 | - parent::__construct($message, $hint, $code, $previous); |
|
50 | - } |
|
38 | + /** |
|
39 | + * @param string $message |
|
40 | + * @param string $hint |
|
41 | + * @param int $code |
|
42 | + * @param \Exception|null $previous |
|
43 | + * @since 8.1.0 |
|
44 | + */ |
|
45 | + public function __construct($message = '', $hint = '', $code = 0, \Exception $previous = null) { |
|
46 | + if (empty($message)) { |
|
47 | + $message = 'Unspecified encryption exception'; |
|
48 | + } |
|
49 | + parent::__construct($message, $hint, $code, $previous); |
|
50 | + } |
|
51 | 51 | |
52 | 52 | } |
@@ -27,15 +27,15 @@ |
||
27 | 27 | */ |
28 | 28 | class StorageAuthException extends StorageNotAvailableException { |
29 | 29 | |
30 | - /** |
|
31 | - * StorageAuthException constructor. |
|
32 | - * |
|
33 | - * @param string $message |
|
34 | - * @param \Exception|null $previous |
|
35 | - * @since 9.0.0 |
|
36 | - */ |
|
37 | - public function __construct($message = '', \Exception $previous = null) { |
|
38 | - $l = \OC::$server->getL10N('core'); |
|
39 | - parent::__construct($l->t('Storage unauthorized. %s', [$message]), self::STATUS_UNAUTHORIZED, $previous); |
|
40 | - } |
|
30 | + /** |
|
31 | + * StorageAuthException constructor. |
|
32 | + * |
|
33 | + * @param string $message |
|
34 | + * @param \Exception|null $previous |
|
35 | + * @since 9.0.0 |
|
36 | + */ |
|
37 | + public function __construct($message = '', \Exception $previous = null) { |
|
38 | + $l = \OC::$server->getL10N('core'); |
|
39 | + parent::__construct($l->t('Storage unauthorized. %s', [$message]), self::STATUS_UNAUTHORIZED, $previous); |
|
40 | + } |
|
41 | 41 | } |
@@ -27,16 +27,16 @@ |
||
27 | 27 | */ |
28 | 28 | class StorageBadConfigException extends StorageNotAvailableException { |
29 | 29 | |
30 | - /** |
|
31 | - * ExtStorageBadConfigException constructor. |
|
32 | - * |
|
33 | - * @param string $message |
|
34 | - * @param \Exception|null $previous |
|
35 | - * @since 9.0.0 |
|
36 | - */ |
|
37 | - public function __construct($message = '', \Exception $previous = null) { |
|
38 | - $l = \OC::$server->getL10N('core'); |
|
39 | - parent::__construct($l->t('Storage incomplete configuration. %s', [$message]), self::STATUS_INCOMPLETE_CONF, $previous); |
|
40 | - } |
|
30 | + /** |
|
31 | + * ExtStorageBadConfigException constructor. |
|
32 | + * |
|
33 | + * @param string $message |
|
34 | + * @param \Exception|null $previous |
|
35 | + * @since 9.0.0 |
|
36 | + */ |
|
37 | + public function __construct($message = '', \Exception $previous = null) { |
|
38 | + $l = \OC::$server->getL10N('core'); |
|
39 | + parent::__construct($l->t('Storage incomplete configuration. %s', [$message]), self::STATUS_INCOMPLETE_CONF, $previous); |
|
40 | + } |
|
41 | 41 | |
42 | 42 | } |
@@ -32,25 +32,25 @@ |
||
32 | 32 | */ |
33 | 33 | class ForbiddenException extends \Exception { |
34 | 34 | |
35 | - /** @var bool */ |
|
36 | - private $retry; |
|
35 | + /** @var bool */ |
|
36 | + private $retry; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @param string $message |
|
40 | - * @param bool $retry |
|
41 | - * @param \Exception|null $previous previous exception for cascading |
|
42 | - * @since 9.0.0 |
|
43 | - */ |
|
44 | - public function __construct($message, $retry, \Exception $previous = null) { |
|
45 | - parent::__construct($message, 0, $previous); |
|
46 | - $this->retry = $retry; |
|
47 | - } |
|
38 | + /** |
|
39 | + * @param string $message |
|
40 | + * @param bool $retry |
|
41 | + * @param \Exception|null $previous previous exception for cascading |
|
42 | + * @since 9.0.0 |
|
43 | + */ |
|
44 | + public function __construct($message, $retry, \Exception $previous = null) { |
|
45 | + parent::__construct($message, 0, $previous); |
|
46 | + $this->retry = $retry; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @return bool |
|
51 | - * @since 9.0.0 |
|
52 | - */ |
|
53 | - public function getRetry() { |
|
54 | - return (bool) $this->retry; |
|
55 | - } |
|
49 | + /** |
|
50 | + * @return bool |
|
51 | + * @since 9.0.0 |
|
52 | + */ |
|
53 | + public function getRetry() { |
|
54 | + return (bool) $this->retry; |
|
55 | + } |
|
56 | 56 | } |
@@ -27,15 +27,15 @@ |
||
27 | 27 | */ |
28 | 28 | class StorageTimeoutException extends StorageNotAvailableException { |
29 | 29 | |
30 | - /** |
|
31 | - * StorageTimeoutException constructor. |
|
32 | - * |
|
33 | - * @param string $message |
|
34 | - * @param \Exception|null $previous |
|
35 | - * @since 9.0.0 |
|
36 | - */ |
|
37 | - public function __construct($message = '', \Exception $previous = null) { |
|
38 | - $l = \OC::$server->getL10N('core'); |
|
39 | - parent::__construct($l->t('Storage connection timeout. %s', [$message]), self::STATUS_TIMEOUT, $previous); |
|
40 | - } |
|
30 | + /** |
|
31 | + * StorageTimeoutException constructor. |
|
32 | + * |
|
33 | + * @param string $message |
|
34 | + * @param \Exception|null $previous |
|
35 | + * @since 9.0.0 |
|
36 | + */ |
|
37 | + public function __construct($message = '', \Exception $previous = null) { |
|
38 | + $l = \OC::$server->getL10N('core'); |
|
39 | + parent::__construct($l->t('Storage connection timeout. %s', [$message]), self::STATUS_TIMEOUT, $previous); |
|
40 | + } |
|
41 | 41 | } |
@@ -27,15 +27,15 @@ |
||
27 | 27 | */ |
28 | 28 | class StorageConnectionException extends StorageNotAvailableException { |
29 | 29 | |
30 | - /** |
|
31 | - * StorageConnectionException constructor. |
|
32 | - * |
|
33 | - * @param string $message |
|
34 | - * @param \Exception|null $previous |
|
35 | - * @since 9.0.0 |
|
36 | - */ |
|
37 | - public function __construct($message = '', \Exception $previous = null) { |
|
38 | - $l = \OC::$server->getL10N('core'); |
|
39 | - parent::__construct($l->t('Storage connection error. %s', [$message]), self::STATUS_NETWORK_ERROR, $previous); |
|
40 | - } |
|
30 | + /** |
|
31 | + * StorageConnectionException constructor. |
|
32 | + * |
|
33 | + * @param string $message |
|
34 | + * @param \Exception|null $previous |
|
35 | + * @since 9.0.0 |
|
36 | + */ |
|
37 | + public function __construct($message = '', \Exception $previous = null) { |
|
38 | + $l = \OC::$server->getL10N('core'); |
|
39 | + parent::__construct($l->t('Storage connection error. %s', [$message]), self::STATUS_NETWORK_ERROR, $previous); |
|
40 | + } |
|
41 | 41 | } |
@@ -33,46 +33,46 @@ |
||
33 | 33 | |
34 | 34 | class ContactsMenuController extends Controller { |
35 | 35 | |
36 | - /** @var Manager */ |
|
37 | - private $manager; |
|
36 | + /** @var Manager */ |
|
37 | + private $manager; |
|
38 | 38 | |
39 | - /** @var IUserSession */ |
|
40 | - private $userSession; |
|
39 | + /** @var IUserSession */ |
|
40 | + private $userSession; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @param IRequest $request |
|
44 | - * @param IUserSession $userSession |
|
45 | - * @param Manager $manager |
|
46 | - */ |
|
47 | - public function __construct(IRequest $request, IUserSession $userSession, Manager $manager) { |
|
48 | - parent::__construct('core', $request); |
|
49 | - $this->userSession = $userSession; |
|
50 | - $this->manager = $manager; |
|
51 | - } |
|
42 | + /** |
|
43 | + * @param IRequest $request |
|
44 | + * @param IUserSession $userSession |
|
45 | + * @param Manager $manager |
|
46 | + */ |
|
47 | + public function __construct(IRequest $request, IUserSession $userSession, Manager $manager) { |
|
48 | + parent::__construct('core', $request); |
|
49 | + $this->userSession = $userSession; |
|
50 | + $this->manager = $manager; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @NoAdminRequired |
|
55 | - * |
|
56 | - * @param string|null filter |
|
57 | - * @return \JsonSerializable[] |
|
58 | - */ |
|
59 | - public function index($filter = null) { |
|
60 | - return $this->manager->getEntries($this->userSession->getUser(), $filter); |
|
61 | - } |
|
53 | + /** |
|
54 | + * @NoAdminRequired |
|
55 | + * |
|
56 | + * @param string|null filter |
|
57 | + * @return \JsonSerializable[] |
|
58 | + */ |
|
59 | + public function index($filter = null) { |
|
60 | + return $this->manager->getEntries($this->userSession->getUser(), $filter); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @NoAdminRequired |
|
65 | - * |
|
66 | - * @param integer $shareType |
|
67 | - * @param string $shareWith |
|
68 | - * @return JSONResponse|\JsonSerializable |
|
69 | - */ |
|
70 | - public function findOne($shareType, $shareWith) { |
|
71 | - $contact = $this->manager->findOne($this->userSession->getUser(), $shareType, $shareWith); |
|
63 | + /** |
|
64 | + * @NoAdminRequired |
|
65 | + * |
|
66 | + * @param integer $shareType |
|
67 | + * @param string $shareWith |
|
68 | + * @return JSONResponse|\JsonSerializable |
|
69 | + */ |
|
70 | + public function findOne($shareType, $shareWith) { |
|
71 | + $contact = $this->manager->findOne($this->userSession->getUser(), $shareType, $shareWith); |
|
72 | 72 | |
73 | - if ($contact) { |
|
74 | - return $contact; |
|
75 | - } |
|
76 | - return new JSONResponse([], Http::STATUS_NOT_FOUND); |
|
77 | - } |
|
73 | + if ($contact) { |
|
74 | + return $contact; |
|
75 | + } |
|
76 | + return new JSONResponse([], Http::STATUS_NOT_FOUND); |
|
77 | + } |
|
78 | 78 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | |
23 | 23 | return [ |
24 | - 'routes' => [ |
|
25 | - ['name' => 'Notifications#view', 'url' => '/notifications/view/{id}', 'verb' => 'GET'], |
|
26 | - ] |
|
24 | + 'routes' => [ |
|
25 | + ['name' => 'Notifications#view', 'url' => '/notifications/view/{id}', 'verb' => 'GET'], |
|
26 | + ] |
|
27 | 27 | ]; |