Completed
Push — master ( b6a9d1...1b7f7e )
by Mahmoud
03:41
created
app/Ship/Engine/Loaders/MigrationsLoaderTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     }
37 37
 
38 38
     /**
39
-     * @param $directory
39
+     * @param string $directory
40 40
      */
41 41
     private function loadMigrations($directory)
42 42
     {
Please login to merge, or discard this patch.
app/Ship/Engine/Loaders/RoutesLoaderTrait.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     /**
79 79
      * @param $file
80
-     * @param $controllerNamespace
80
+     * @param string $controllerNamespace
81 81
      */
82 82
     private function loadWebRoute($file, $controllerNamespace)
83 83
     {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     /**
146 146
      * @param \Symfony\Component\Finder\SplFileInfo $file
147 147
      *
148
-     * @return  mixed
148
+     * @return  string
149 149
      */
150 150
     private function getRouteFileNameWithoutExtension(SplFileInfo $file)
151 151
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $this->webRouter->group([
85 85
             'middleware' => ['web'],
86 86
             'namespace'  => $controllerNamespace,
87
-        ], function (LaravelRouter $router) use ($file) {
87
+        ], function(LaravelRouter $router) use ($file) {
88 88
             require $file->getPathname();
89 89
         });
90 90
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $apiVersionNumber = $this->getRouteFileVersionNumber($file);
101 101
 
102 102
         $this->apiRouter->version('v' . $apiVersionNumber,
103
-            function (DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) {
103
+            function(DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) {
104 104
 
105 105
                 $controllerNamespace = $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\UI\API\Controllers';
106 106
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                     'limit'      => Config::get('hello.api.limit'),
114 114
                     // The API limit expiry time.
115 115
                     'expires'    => Config::get('hello.api.limit_expires'),
116
-                ], function ($router) use ($file) {
116
+                ], function($router) use ($file) {
117 117
 
118 118
                     require $file->getPathname();
119 119
 
Please login to merge, or discard this patch.
app/Ship/Engine/Loaders/ViewsLoaderTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     }
32 32
 
33 33
     /**
34
-     * @param $directory
34
+     * @param string $directory
35 35
      * @param $containerName
36 36
      */
37 37
     private function loadViews($directory, $containerName)
Please login to merge, or discard this patch.
app/Containers/Authorization/Traits/AuthorizationTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 trait AuthorizationTrait
13 13
 {
14 14
     /**
15
-     * @return  \App\Containers\User\Models\User|null
15
+     * @return  \Illuminate\Contracts\Auth\Authenticatable|null
16 16
      */
17 17
     public function getUser()
18 18
     {
Please login to merge, or discard this patch.
app/Ship/Parents/Requests/Request.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Ship\Parents\Requests;
4 4
 
5
-use App\Containers\Authorization\Traits\AuthorizationTrait;
6 5
 use App\Ship\Engine\Traits\HashIdTrait;
7 6
 use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
8 7
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function hasAccess(User $user = null)
29 29
     {
30 30
         // if not in parameters, take from the request object {$this}
31
-        $user = $user ? : $this->user();
31
+        $user = $user ?: $this->user();
32 32
 
33 33
         $hasAccess = array_merge(
34 34
             $this->hasAnyPermissionAccess($user),
Please login to merge, or discard this patch.
app/Ship/Parents/Requests/RequestTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      * To call functions and compare their bool responses to determine
53 53
      * if the user can proceed with the request or not.
54 54
      *
55
-     * @param array $functions
55
+     * @param string[] $functions
56 56
      *
57 57
      * @return  bool
58 58
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         $permissions = explode('|', $this->access['permissions']);
127 127
 
128
-        $hasAccess = array_map(function ($permission) use ($user) {
128
+        $hasAccess = array_map(function($permission) use ($user) {
129 129
             // Note: internal return
130 130
             return $user->hasPermissionTo($permission);
131 131
         }, $permissions);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
         $roles = explode('|', $this->access['roles']);
148 148
 
149
-        $hasAccess = array_map(function ($role) use ($user) {
149
+        $hasAccess = array_map(function($role) use ($user) {
150 150
             // Note: internal return
151 151
             return $user->hasRole($role);
152 152
         }, $roles);
Please login to merge, or discard this patch.
app/Containers/User/UI/API/Routes/CreateAdmin.v1.private.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
 $router->post('admins', [
43 43
     'uses'  => 'Controller@createAdmin',
44 44
     'middleware' => [
45
-      'api.auth',
45
+        'api.auth',
46 46
     ],
47 47
 ]);
Please login to merge, or discard this patch.
app/Ship/Parents/Tests/PhpUnit/TestCase.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Ship\Parents\Tests\PhpUnit;
4 4
 
5 5
 use App\Ship\Engine\Traits\HashIdTrait;
6
-use App\Ship\Features\Tests\PhpUnit\TestingTrait;
7 6
 use App\Ship\Features\Tests\PhpUnit\TestsAuthHelperTrait;
8 7
 use App\Ship\Features\Tests\PhpUnit\TestsCustomHelperTrait;
9 8
 use App\Ship\Features\Tests\PhpUnit\TestsMockHelperTrait;
Please login to merge, or discard this patch.
app/Ship/Engine/Traits/HashIdTrait.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     /**
183 183
      * @param $subject
184 184
      * @param $findKey
185
-     * @param $callback
185
+     * @param \Closure $callback
186 186
      *
187 187
      * @return  array
188 188
      */
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     }
207 207
 
208 208
     /**
209
-     * @param $search
209
+     * @param string $search
210 210
      * @param $subject
211 211
      *
212 212
      * @return  mixed
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     }
226 226
 
227 227
     /**
228
-     * @param $needle
228
+     * @param string $needle
229 229
      * @param $haystack
230 230
      *
231 231
      * @return  int
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         // hash the ID only if hash-id enabled in the config
36 36
         if (Config::get('hello.hash-id')) {
37
-            return $this->encoder(($key) ? : $this->getKey());
37
+            return $this->encoder(($key) ?: $this->getKey());
38 38
         }
39 39
 
40 40
         return $this->getKey();
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         // get the last part of the key, which should be the ID that needs decoding
116 116
         $idToDecode = substr($key, strrpos($key, '.*.') + 3);
117 117
 
118
-        array_walk_recursive($requestData, function (&$value, $key) use ($idToDecode) {
118
+        array_walk_recursive($requestData, function(&$value, $key) use ($idToDecode) {
119 119
 
120 120
             if ($key == $idToDecode) {
121 121
                 $value = $this->decode($value, $key);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $idToDecode = $this->removeLastOccurrenceFromString($key, '.*');
134 134
 
135
-        $this->findKeyAndReturnValue($requestData, $idToDecode, function ($ids) use ($key) {
135
+        $this->findKeyAndReturnValue($requestData, $idToDecode, function($ids) use ($key) {
136 136
 
137 137
             if (!is_array($ids)) {
138 138
                 throw new IncorrectIdException('Expected ID\'s to be in array. Please wrap your ID\'s in an Array and send them back.');
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     public function runHashedIdsDecoder()
275 275
     {
276 276
         if (Config::get('hello.hash-id')) {
277
-            Route::bind('id', function ($id, $route) {
277
+            Route::bind('id', function($id, $route) {
278 278
                 // skip decoding some endpoints
279 279
                 if (!in_array($route->uri(), $this->skippedEndpoints)) {
280 280
 
Please login to merge, or discard this patch.