@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * call on the after saves |
38 | 38 | * |
39 | - * @return void |
|
39 | + * @return boolean |
|
40 | 40 | */ |
41 | 41 | protected function associateFileSystem(): bool |
42 | 42 | { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * ];. |
172 | 172 | * |
173 | 173 | * @param array $files |
174 | - * @return void |
|
174 | + * @return boolean |
|
175 | 175 | */ |
176 | 176 | public function attach(array $files): bool |
177 | 177 | { |
@@ -290,7 +290,6 @@ discard block |
||
290 | 290 | * when a company has over 1k images |
291 | 291 | * |
292 | 292 | * @deprecated version 0.2 |
293 | - * @param string $name |
|
294 | 293 | * @return void |
295 | 294 | */ |
296 | 295 | public function getAttachmentByName(string $fieldName) |
@@ -338,7 +337,6 @@ discard block |
||
338 | 337 | /** |
339 | 338 | * Given this entity define a new path. |
340 | 339 | * |
341 | - * @param string $path |
|
342 | 340 | * @return string |
343 | 341 | */ |
344 | 342 | protected function filesNewAttachedPath(): ?string |
@@ -4,15 +4,14 @@ |
||
4 | 4 | |
5 | 5 | namespace Canvas\Traits; |
6 | 6 | |
7 | -use Canvas\Models\SystemModules; |
|
8 | -use Canvas\Models\FileSystem; |
|
9 | -use RuntimeException; |
|
10 | -use Phalcon\Mvc\Model\Resultset\Simple; |
|
11 | -use Canvas\Models\FileSystemEntities; |
|
12 | 7 | use Canvas\Dto\Files; |
13 | 8 | use Canvas\Mapper\FileMapper; |
9 | +use Canvas\Models\FileSystem; |
|
10 | +use Canvas\Models\FileSystemEntities; |
|
11 | +use Canvas\Models\SystemModules; |
|
14 | 12 | use Phalcon\Di; |
15 | 13 | use Phalcon\Mvc\Model\ResultsetInterface; |
14 | +use RuntimeException; |
|
16 | 15 | |
17 | 16 | /** |
18 | 17 | * Trait ResponseTrait. |
@@ -46,5 +46,8 @@ |
||
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | |
49 | + /** |
|
50 | + * @param string $header |
|
51 | + */ |
|
49 | 52 | abstract public function getHeader($header); |
50 | 53 | } |
@@ -3,12 +3,10 @@ |
||
3 | 3 | |
4 | 4 | namespace Canvas\Validations; |
5 | 5 | |
6 | -use Phalcon\Validation; |
|
7 | -use Phalcon\Validation\Validator\PresenceOf; |
|
6 | +use Canvas\Validation as CanvasValidation; |
|
8 | 7 | use Phalcon\Validation\Validator\Confirmation; |
8 | +use Phalcon\Validation\Validator\PresenceOf; |
|
9 | 9 | use Phalcon\Validation\Validator\StringLength; |
10 | -use Exception; |
|
11 | -use Canvas\Validation as CanvasValidation; |
|
12 | 10 | |
13 | 11 | class PasswordValidation |
14 | 12 | { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | /** |
44 | 44 | * Handle the object's destruction. |
45 | 45 | * |
46 | - * @return void |
|
46 | + * @return boolean |
|
47 | 47 | */ |
48 | 48 | public function __destruct() |
49 | 49 | { |
@@ -3,9 +3,6 @@ |
||
3 | 3 | |
4 | 4 | namespace Canvas\Models; |
5 | 5 | |
6 | -use Phalcon\Validation; |
|
7 | -use Phalcon\Validation\Validator\PresenceOf; |
|
8 | - |
|
9 | 6 | /** |
10 | 7 | * Class CompanyBranches. |
11 | 8 | * |
@@ -12,8 +12,6 @@ |
||
12 | 12 | class CompaniesGroupsMapper extends CustomMapper |
13 | 13 | { |
14 | 14 | /** |
15 | - * @param Baka\Database\CustomFilters\CustomFilters $filter |
|
16 | - * @param \Canvas\Dto\CustomFilter $filterSchema |
|
17 | 15 | * @return ListSchema |
18 | 16 | */ |
19 | 17 | public function mapToObject($companiesGroup, $companiesGroupDto, array $context = []) |
@@ -3,9 +3,6 @@ |
||
3 | 3 | |
4 | 4 | namespace Canvas\Models; |
5 | 5 | |
6 | -use Phalcon\Validation; |
|
7 | -use Phalcon\Validation\Validator\PresenceOf; |
|
8 | - |
|
9 | 6 | /** |
10 | 7 | * Class CompanyBranches. |
11 | 8 | * |
@@ -34,8 +34,6 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * Constructor setup info for Pusher |
36 | 36 | * |
37 | - * @param string $channel |
|
38 | - * @param string $event |
|
39 | 37 | * @param array $params |
40 | 38 | */ |
41 | 39 | public function __construct(string $appName, string $appDescription, array $params) |
@@ -48,7 +46,7 @@ discard block |
||
48 | 46 | /** |
49 | 47 | * Handle the pusher request |
50 | 48 | * @todo New Apps can't be created, the system does not take into account the creation of other apps apart from the default. Need to change this |
51 | - * @return void |
|
49 | + * @return boolean |
|
52 | 50 | */ |
53 | 51 | public function handle() |
54 | 52 | { |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use Canvas\Contracts\Queue\QueueableJobInterfase; |
6 | 6 | use Canvas\Jobs\Job; |
7 | -use Phalcon\Di; |
|
8 | 7 | use Canvas\Models\Apps as CanvasApps; |
8 | +use Phalcon\Di; |
|
9 | 9 | use Phalcon\Security\Random; |
10 | 10 | |
11 | 11 | class Apps extends Job implements QueueableJobInterfase |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * Get the current App. |
127 | 127 | * |
128 | - * @return void |
|
128 | + * @return Apps |
|
129 | 129 | */ |
130 | 130 | public function getApp() : Apps |
131 | 131 | { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | /** |
140 | 140 | * Get the current App. |
141 | 141 | * |
142 | - * @return void |
|
142 | + * @return Companies |
|
143 | 143 | */ |
144 | 144 | public function getCompany() : Companies |
145 | 145 | { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | * Given a resource with a dot CRM.Leads , it will set the app. |
244 | 244 | * |
245 | 245 | * @param string $resource |
246 | - * @return void |
|
246 | + * @return string |
|
247 | 247 | */ |
248 | 248 | protected function setAppByResource(string $resource) : string |
249 | 249 | { |
@@ -265,8 +265,7 @@ discard block |
||
265 | 265 | /** |
266 | 266 | * Given a resource with a dot CRM.Leads , it will set the app. |
267 | 267 | * |
268 | - * @param string $resource |
|
269 | - * @return void |
|
268 | + * @return string |
|
270 | 269 | */ |
271 | 270 | protected function setAppByRole(string $role) : string |
272 | 271 | { |
@@ -298,7 +297,7 @@ discard block |
||
298 | 297 | * $acl->addResource('App.customers', ['create', 'search']); |
299 | 298 | * </code>. |
300 | 299 | * |
301 | - * @param \Phalcon\Acl\Resource|string $resource |
|
300 | + * @param string $resource |
|
302 | 301 | * @param array|string $accessList |
303 | 302 | * @return boolean |
304 | 303 | */ |
@@ -418,7 +417,7 @@ discard block |
||
418 | 417 | * |
419 | 418 | * @param string $roleName |
420 | 419 | * @param string $resourceName |
421 | - * @param array|string $access |
|
420 | + * @param string[] $access |
|
422 | 421 | * @param mixed $func |
423 | 422 | */ |
424 | 423 | public function allow($roleName, $resourceName, $access, $func = null) |
@@ -4,22 +4,21 @@ |
||
4 | 4 | |
5 | 5 | namespace Canvas\Acl; |
6 | 6 | |
7 | -use Phalcon\Db; |
|
8 | -use Phalcon\Db\AdapterInterface as DbAdapter; |
|
7 | +use BadMethodCallException; |
|
8 | +use Canvas\Models\AccessList as AccessListDB; |
|
9 | +use Canvas\Models\Apps; |
|
10 | +use Canvas\Models\Companies; |
|
11 | +use Canvas\Models\Resources as ResourcesDB; |
|
12 | +use Canvas\Models\ResourcesAccesses; |
|
13 | +use Canvas\Models\Roles as RolesDB; |
|
14 | +use Phalcon\Acl; |
|
15 | +use Phalcon\Acl\Adapter; |
|
9 | 16 | use Phalcon\Acl\Exception; |
10 | 17 | use Phalcon\Acl\Resource; |
11 | -use Phalcon\Acl; |
|
12 | 18 | use Phalcon\Acl\Role; |
13 | 19 | use Phalcon\Acl\RoleInterface; |
14 | -use Canvas\Models\Companies; |
|
15 | -use Canvas\Models\Apps; |
|
16 | -use Canvas\Models\Roles as RolesDB; |
|
17 | -use Canvas\Models\AccessList as AccessListDB; |
|
18 | -use Canvas\Models\Resources as ResourcesDB; |
|
19 | -use Phalcon\Acl\Adapter; |
|
20 | -use BadMethodCallException; |
|
21 | -use Canvas\Exception\ModelException; |
|
22 | -use Canvas\Models\ResourcesAccesses; |
|
20 | +use Phalcon\Db; |
|
21 | +use Phalcon\Db\AdapterInterface as DbAdapter; |
|
23 | 22 | use Phalcon\Di; |
24 | 23 | |
25 | 24 | /** |