@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Application\Modules\Rest\Events\BeforeExecuteRoute; |
3 | 3 | |
4 | -use Phalcon\Logger; |
|
5 | 4 | use Application\Modules\Rest\Exceptions\ToManyRequestsException; |
6 | 5 | use Application\Modules\Rest\Aware\RestValidatorProvider; |
7 | 6 |
@@ -1,10 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Application\Modules; |
3 | 3 | |
4 | -use Application\Modules\Rest\Exceptions\RequestTimeoutException; |
|
5 | 4 | use Phalcon\DI; |
6 | 5 | use Phalcon\Mvc\Dispatcher; |
7 | -use Phalcon\Http\Response; |
|
8 | 6 | use Phalcon\Mvc\View; |
9 | 7 | use Application\Modules\Rest\Services\RestExceptionHandler; |
10 | 8 | use Application\Modules\Rest\Exceptions\InternalServerErrorException; |
@@ -71,7 +71,6 @@ discard block |
||
71 | 71 | /** |
72 | 72 | * Set cache value into cache storage |
73 | 73 | * |
74 | - * @param mixed $object |
|
75 | 74 | * @param string $key |
76 | 75 | * @param bool $cached |
77 | 76 | * @return mixed cached object |
@@ -120,7 +119,7 @@ discard block |
||
120 | 119 | /** |
121 | 120 | * Get the cache storage |
122 | 121 | * |
123 | - * @return \Phalcon\Cache\Backend\Memcache |
|
122 | + * @return Storage |
|
124 | 123 | */ |
125 | 124 | public function getStorage() { |
126 | 125 | |
@@ -155,7 +154,7 @@ discard block |
||
155 | 154 | /** |
156 | 155 | * Truncate opcode cache data |
157 | 156 | * |
158 | - * @return boolean |
|
157 | + * @return boolean|null |
|
159 | 158 | */ |
160 | 159 | public function flush() { |
161 | 160 | return $this->getStorage()->flush(); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * Set dependency container |
55 | 55 | * |
56 | - * @param \Phalcon\Di\FactoryDefault $di |
|
56 | + * @param \Phalcon\DiInterface $di |
|
57 | 57 | * @return RestExceptionHandler |
58 | 58 | */ |
59 | 59 | private function setDi(\Phalcon\DiInterface $di) |
@@ -65,7 +65,6 @@ discard block |
||
65 | 65 | /** |
66 | 66 | * Handle exception data |
67 | 67 | * |
68 | - * @param \Exception $data |
|
69 | 68 | */ |
70 | 69 | public function handle(\Exception $exception) { |
71 | 70 | |
@@ -112,7 +111,7 @@ discard block |
||
112 | 111 | |
113 | 112 | /** |
114 | 113 | * Get exception data |
115 | - * @return array |
|
114 | + * @return \Exception |
|
116 | 115 | */ |
117 | 116 | private function getException() { |
118 | 117 | return $this->exception; |
@@ -161,7 +160,7 @@ discard block |
||
161 | 160 | /** |
162 | 161 | * Check if message has a json format |
163 | 162 | * |
164 | - * @param $string |
|
163 | + * @param string $string |
|
165 | 164 | * @return bool |
166 | 165 | */ |
167 | 166 | private function isJson($string) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param array $credentials |
37 | 37 | * @throws \Application\Modules\Rest\Exceptions\UnauthorizedException |
38 | 38 | * @throws \Application\Modules\Rest\Exceptions\NotFoundException |
39 | - * @return ResultSet |
|
39 | + * @return UserDTO |
|
40 | 40 | */ |
41 | 41 | public function authenticate(array $credentials) { |
42 | 42 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * Register new user from credentials |
83 | 83 | * |
84 | 84 | * @param array $credentials |
85 | - * @return ResultSet |
|
85 | + * @return UserDTO |
|
86 | 86 | * @throws \Application\Modules\Rest\Exceptions\BadRequestException |
87 | 87 | * @throws \Application\Modules\Rest\Exceptions\ConflictException |
88 | 88 | */ |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | /** |
222 | 222 | * If user has role? |
223 | 223 | * |
224 | - * @param mixed $role |
|
224 | + * @param mixed $roles |
|
225 | 225 | * @return boolean |
226 | 226 | */ |
227 | 227 | public function hasRole($roles) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * Send recovery message |
247 | 247 | * |
248 | 248 | * @param \Application\Models\Users $user |
249 | - * @param $password |
|
249 | + * @param integer $password |
|
250 | 250 | * @throws UnprocessableEntityException |
251 | 251 | */ |
252 | 252 | private function recoverySend(\Application\Models\Users $user, $password) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Set response content length |
166 | 166 | * |
167 | 167 | * @param string $content |
168 | - * @return RestService |
|
168 | + * @return integer |
|
169 | 169 | */ |
170 | 170 | public function setContentLength($content) { |
171 | 171 | return strlen(json_encode($content)); |
@@ -322,7 +322,6 @@ discard block |
||
322 | 322 | /** |
323 | 323 | * Send response to client |
324 | 324 | * |
325 | - * @param boolean $modified |
|
326 | 325 | * @return \Phalcon\Http\ResponseInterface |
327 | 326 | */ |
328 | 327 | public function response() { |
@@ -92,7 +92,6 @@ |
||
92 | 92 | * Filter request params |
93 | 93 | * |
94 | 94 | * @param array $params |
95 | - * @param string $function |
|
96 | 95 | * @example <code> |
97 | 96 | * <?php $this->filterParams($params, ['trim']); ?> |
98 | 97 | * </code> |
@@ -162,7 +162,6 @@ |
||
162 | 162 | /** |
163 | 163 | * Resolve & parse GET Response |
164 | 164 | * |
165 | - * @param \Phalcon\Http\Request $request |
|
166 | 165 | */ |
167 | 166 | private function getResolver() { |
168 | 167 |
@@ -75,7 +75,6 @@ |
||
75 | 75 | /** |
76 | 76 | * Set cache value into opcode cache storage |
77 | 77 | * |
78 | - * @param mixed $object |
|
79 | 78 | * @param string $key |
80 | 79 | * @param bool $cached |
81 | 80 | * @return mixed cached object |