Completed
Push — master ( 21ea68...552bf8 )
by Mahmoud
03:30
created
app/Port/Test/PHPUnit/Abstracts/TestCase.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use App\Port\Test\PHPUnit\Traits\CustomTestsHelpersTrait;
6 6
 use App\Port\Test\PHPUnit\Traits\GeneralTestsHelpersTrait;
7 7
 use App\Port\Test\PHPUnit\Traits\TestCaseTrait;
8
-use App\Port\Test\PHPUnit\Traits\TestingTrait;
9 8
 use App\Port\Test\PHPUnit\Traits\TestingUserTrait;
10 9
 use Faker\Generator;
11 10
 use Illuminate\Contracts\Console\Kernel as LaravelKernel;
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/GeneralTestsHelpersTrait.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * Example: you give it ('users/{id}/stores', 100) it returns 'users/100/stores'
72 72
      *
73
-     * @param        $endpoint
73
+     * @param        string $endpoint
74 74
      * @param        $id
75 75
      * @param bool   $skipEncoding
76 76
      * @param string $replace
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     }
193 193
 
194 194
     /**
195
-     * @param $keys
195
+     * @param string[] $keys
196 196
      * @param $response
197 197
      */
198 198
     public function assertResponseContainKeys($keys, $response)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Port\Test\PHPUnit\Traits;
4 4
 
5 5
 use App;
6
-use Artisan;
7 6
 use Dingo\Api\Http\Response as DingoAPIResponse;
8 7
 use Illuminate\Http\Response;
9 8
 use Illuminate\Http\UploadedFile;
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/TestCaseTrait.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use App;
6 6
 use Artisan;
7
-use Dingo\Api\Http\Response as DingoAPIResponse;
8 7
 
9 8
 /**
10 9
  * Class TestCaseTrait
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -418,7 +418,7 @@
 block discarded – undo
418 418
      */
419 419
     public function overrideSubDomain($subDomain, $url = null)
420 420
     {
421
-        $url = ($url) ? : $this->baseUrl;
421
+        $url = ($url) ?: $this->baseUrl;
422 422
 
423 423
         $info = parse_url($url);
424 424
 
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/TestingUserTrait.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
5 5
 use App;
6 6
 use App\Containers\Authentication\Tasks\ApiLoginThisUserObjectTask;
7 7
 use App\Containers\User\Models\User;
8
-use Artisan;
9
-use Dingo\Api\Http\Response as DingoAPIResponse;
10 8
 use Illuminate\Support\Facades\Hash;
11 9
 
12 10
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function createTestingUser($access = null, $userDetails = null)
99 99
     {
100 100
         // if no user detail provided, use the default details.
101
-        $userDetails = $userDetails ? : [
101
+        $userDetails = $userDetails ?: [
102 102
             'name'     => 'Testing User',
103 103
             'email'    => $this->faker->email,
104 104
             'password' => 'testing-pass',
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         ]);
113 113
 
114 114
         // assign roles and permissions
115
-        $user = $this->setupTestingUserAccess($user, $access ? : (isset($this->access) ? $this->access : null));
115
+        $user = $this->setupTestingUserAccess($user, $access ?: (isset($this->access) ? $this->access : null));
116 116
 
117 117
         // log the user in
118 118
         $user = App::make(ApiLoginThisUserObjectTask::class)->run($user);
Please login to merge, or discard this patch.
app/Port/HashId/Traits/HashIdTrait.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function runEndpointsHashedIdsDecoder()
30 30
     {
31 31
         if (Config::get('hello.hash-id')) {
32
-            Route::bind('id', function ($id, $route) {
32
+            Route::bind('id', function($id, $route) {
33 33
                 // skip decoding some endpoints
34 34
                 if (!in_array($route->uri(), $this->skippedEndpoints)) {
35 35
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         // hash the ID only if hash-id enabled in the config
60 60
         if (Config::get('hello.hash-id')) {
61
-            return $this->encoder(($key) ? : $this->getKey());
61
+            return $this->encoder(($key) ?: $this->getKey());
62 62
         }
63 63
 
64 64
         return $this->getKey();
@@ -85,8 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
                 if (Config::get('hello.hash-id')) {
87 87
                     $requestData[$id] = is_array($requestData[$id]) ?
88
-                        $this->decodeThisArrayOfIds($requestData[$id]) :
89
-                        $this->decodeThisId($requestData[$id]);
88
+                        $this->decodeThisArrayOfIds($requestData[$id]) : $this->decodeThisId($requestData[$id]);
90 89
                 }
91 90
 
92 91
             } // do nothing if the input is incorrect, because what if it's not required!
Please login to merge, or discard this patch.
app/Containers/Authorization/Actions/AttachPermissionsToRoleAction.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
         $permissions = [];
60 60
 
61 61
         if (is_array($permissionsIds)) {
62
-            foreach ($permissionsIds as $permissionId){
62
+            foreach ($permissionsIds as $permissionId) {
63 63
                 $permissions[] = $this->getPermissionTask->run($permissionId);
64 64
             }
65
-        }else{
65
+        } else {
66 66
             $permissions[] = $this->getPermissionTask->run($permissionsIds);
67 67
         }
68 68
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             foreach ($permissionsIds as $permissionId){
63 63
                 $permissions[] = $this->getPermissionTask->run($permissionId);
64 64
             }
65
-        }else{
65
+        } else{
66 66
             $permissions[] = $this->getPermissionTask->run($permissionsIds);
67 67
         }
68 68
 
Please login to merge, or discard this patch.
app/Containers/Authorization/Data/Factories/PermissionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 // User
4 4
 use App\Containers\Authorization\Models\Permission;
5 5
 
6
-$factory->define(Permission::class, function (Faker\Generator $faker) {
6
+$factory->define(Permission::class, function(Faker\Generator $faker) {
7 7
 
8 8
     return [
9 9
         'name' => $faker->slug,
Please login to merge, or discard this patch.
app/Containers/Authorization/Actions/RevokeUserFromRoleAction.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-     * @param User|integer $userId
53
+     * @param User|integer $user
54 54
      * @param integer|array $rolesIds
55 55
      *
56 56
      * @return  \App\Containers\User\Models\User
Please login to merge, or discard this patch.