Failed Conditions
Pull Request — master (#298)
by Maximo
02:56
created
src/Traits/SubscriptionPlanLimitTrait.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 
5 5
 namespace Canvas\Traits;
6 6
 
7
-use Canvas\Models\Subscription;
8
-use Canvas\Models\UserCompanyAppsActivities;
9 7
 use Canvas\Exception\SubscriptionPlanLimitException;
10 8
 use Canvas\Http\Exception\InternalServerErrorException;
11
-use ReflectionClass;
9
+use Canvas\Models\Subscription;
10
+use Canvas\Models\UserCompanyAppsActivities;
12 11
 use Phalcon\Di;
12
+use ReflectionClass;
13 13
 
14 14
 /**
15 15
  * Trait ResponseTrait.
Please login to merge, or discard this patch.
src/Notifications/Invitation.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 namespace Canvas\Notifications;
6 6
 
7
-use Canvas\Contracts\Notifications\NotificationInterfase;
8 7
 use Baka\Mail\Message;
9
-use Phalcon\Di;
8
+use Canvas\Contracts\Notifications\NotificationInterfase;
10 9
 use Canvas\Models\Users;
10
+use Phalcon\Di;
11 11
 
12 12
 class Invitation extends Notification implements NotificationInterfase
13 13
 {
Please login to merge, or discard this patch.
src/Notifications/Signup.php 1 patch
Unused Use Statements   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,10 @@
 block discarded – undo
4 4
 
5 5
 namespace Canvas\Notifications;
6 6
 
7
-use Canvas\Contracts\Notifications\NotificationInterfase;
8 7
 use Baka\Mail\Message;
9
-use Canvas\Models\EmailTemplates;
10
-use Phalcon\Di;
11
-use Canvas\Models\Users;
8
+use Canvas\Contracts\Notifications\NotificationInterfase;
12 9
 use Canvas\Template;
10
+use Phalcon\Di;
13 11
 
14 12
 class Signup extends Notification implements NotificationInterfase
15 13
 {
Please login to merge, or discard this patch.
src/Mapper/UserMapper.php 2 patches
Unused Use Statements   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,11 +5,10 @@
 block discarded – undo
5 5
 namespace Canvas\Mapper;
6 6
 
7 7
 use AutoMapperPlus\CustomMapper\CustomMapper;
8
-use Baka\Auth\Models\Apps;
9
-use Canvas\Models\AccessList;
10
-use Phalcon\Di;
11 8
 use Canvas\Contracts\Mapper\RelationshipTrait;
9
+use Canvas\Models\AccessList;
12 10
 use Canvas\Models\Users;
11
+use Phalcon\Di;
13 12
 
14 13
 /**
15 14
  * Class UserMapper.
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     /**
44 44
      * Set the default Kanvas UserData properties.
45 45
      *
46
-     * @param mixed $user
46
+     * @param Users $user
47 47
      * @param object $userDto
48 48
      * @return object
49 49
      */
Please login to merge, or discard this patch.
src/Api/Controllers/UsersController.php 1 patch
Unused Use Statements   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,18 +4,16 @@
 block discarded – undo
4 4
 
5 5
 namespace Canvas\Api\Controllers;
6 6
 
7
-use Canvas\Models\Users;
8
-use Phalcon\Http\Response;
9
-use Phalcon\Validation\Validator\PresenceOf;
10
-use Canvas\Exception\BadRequestHttpException;
11
-use Canvas\Exception\ServerErrorHttpException;
12 7
 use Baka\Auth\UsersController as BakaUsersController;
13 8
 use Canvas\Contracts\Controllers\ProcessOutputMapperTrait;
14 9
 use Canvas\Dto\User as UserDto;
15 10
 use Canvas\Http\Exception\InternalServerErrorException;
16 11
 use Canvas\Mapper\UserMapper;
17
-use Canvas\Validation as CanvasValidation;
12
+use Canvas\Models\Users;
18 13
 use Canvas\Models\UsersAssociatedApps;
14
+use Canvas\Validation as CanvasValidation;
15
+use Phalcon\Http\Response;
16
+use Phalcon\Validation\Validator\PresenceOf;
19 17
 
20 18
 /**
21 19
  * Class UsersController.
Please login to merge, or discard this patch.
src/Models/Users.php 2 patches
Doc Comments   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     /**
329 329
      * Get the User key for redis.
330 330
      *
331
-     * @return string
331
+     * @return integer
332 332
      */
333 333
     public function getKey() : int
334 334
     {
@@ -382,7 +382,6 @@  discard block
 block discarded – undo
382 382
     /**
383 383
      * Strat a free trial.
384 384
      *
385
-     * @param Users $user
386 385
      * @return Subscription
387 386
      */
388 387
     public function startFreeTrial() : Subscription
@@ -515,7 +514,7 @@  discard block
 block discarded – undo
515 514
     /**
516 515
      * update user role for the specific app.
517 516
      *
518
-     * @return void
517
+     * @return boolean
519 518
      */
520 519
     protected function updatePermissionRoles(): bool
521 520
     {
@@ -590,7 +589,7 @@  discard block
 block discarded – undo
590 589
     /**
591 590
      * Overwrite the relationship.
592 591
      *
593
-     * @return void
592
+     * @return string|null
594 593
      */
595 594
     public function getPhoto()
596 595
     {
@@ -600,7 +599,6 @@  discard block
 block discarded – undo
600 599
     /**
601 600
      * Update the user current default company.
602 601
      *
603
-     * @param integer $companyId
604 602
      * @return void
605 603
      */
606 604
     public function switchDefaultCompanyByBranch(int $branchId): void
Please login to merge, or discard this patch.
Unused Use Statements   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,25 +3,25 @@
 block discarded – undo
3 3
 
4 4
 namespace Canvas\Models;
5 5
 
6
+use Baka\Auth\Models\Users as BakUser;
7
+use Baka\Database\Contracts\HashTableTrait;
8
+use Canvas\Auth\App as AppAuth;
9
+use Canvas\Contracts\Notifications\NotifiableTrait;
10
+use Canvas\Hashing\Password;
11
+use Canvas\Traits\EventManagerAwareTrait;
12
+use Canvas\Traits\FileSystemModelTrait;
6 13
 use Canvas\Traits\PermissionsTrait;
7 14
 use Canvas\Traits\SubscriptionPlanLimitTrait;
8
-use Phalcon\Cashier\Billable;
15
+use Canvas\Validations\PasswordValidation;
9 16
 use Carbon\Carbon;
17
+use Exception;
18
+use Phalcon\Cashier\Billable;
19
+use Phalcon\Di;
20
+use Phalcon\Security\Random;
10 21
 use Phalcon\Validation;
11 22
 use Phalcon\Validation\Validator\Email;
12 23
 use Phalcon\Validation\Validator\PresenceOf;
13 24
 use Phalcon\Validation\Validator\Uniqueness;
14
-use Canvas\Traits\FileSystemModelTrait;
15
-use Phalcon\Security\Random;
16
-use Baka\Database\Contracts\HashTableTrait;
17
-use Canvas\Contracts\Notifications\NotifiableTrait;
18
-use Canvas\Traits\EventManagerAwareTrait;
19
-use Phalcon\Di;
20
-use Canvas\Auth\App as AppAuth;
21
-use Exception;
22
-use Canvas\Validations\PasswordValidation;
23
-use Baka\Auth\Models\Users as BakUser;
24
-use Canvas\Hashing\Password;
25 25
 
26 26
 /**
27 27
  * Class Users.
Please login to merge, or discard this patch.
src/Api/Controllers/UserWebhooksController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,6 @@
 block discarded – undo
70 70
     /**
71 71
     * Given the weebhook id, we run a test for it.
72 72
     *
73
-    * @param integer $id
74 73
     * @return Response
75 74
     */
76 75
     public function execute(string $name): Response
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 use Canvas\Http\Exception\UnprocessableEntityException;
8 8
 use Canvas\Models\UserWebhooks;
9 9
 use Canvas\Validation;
10
-use Phalcon\Http\Response;
11 10
 use Canvas\Webhooks;
11
+use Phalcon\Http\Response;
12 12
 use Phalcon\Validation\Validator\PresenceOf;
13 13
 use function Canvas\Core\isJson;
14 14
 
Please login to merge, or discard this patch.
src/Models/UserWebhooks.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -145,6 +145,7 @@
 block discarded – undo
145 145
     /**
146 146
     * Get element by Id.
147 147
     *
148
+    * @param integer $id
148 149
     * @return Webhooks
149 150
     */
150 151
     public static function getById($id): self
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 namespace Canvas\Models;
5 5
 
6 6
 use Phalcon\Di;
7
-use Phalcon\Validation\Validator\Url;
8 7
 use Phalcon\Validation;
8
+use Phalcon\Validation\Validator\Url;
9 9
 
10 10
 class UserWebhooks extends AbstractModel
11 11
 {
Please login to merge, or discard this patch.
src/Traits/NotificationsTrait.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 namespace Canvas\Traits;
6 6
 
7
-use Canvas\Models\SystemModules;
8 7
 use Canvas\Models\Notifications;
8
+use Canvas\Models\SystemModules;
9 9
 use Phalcon\Di;
10 10
 
11 11
 /**
Please login to merge, or discard this patch.