Completed
Push — master ( 3c3d26...8e11a5 )
by Mahmoud
03:30
created
app/Ship/Engine/Loaders/SeederLoaderTrait.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-     * @param array $directories
74
-     * @param       $seedersClasses
73
+     * @param string[] $directories
74
+     * @param       Collection $seedersClasses
75 75
      *
76 76
      * @return  mixed
77 77
      */
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * @param $seedersClasses
105 105
      *
106
-     * @return  \Illuminate\Support\Collection|static
106
+     * @return  Collection|null
107 107
      */
108 108
     private function sortSeeders($seedersClasses)
109 109
     {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     }
141 141
 
142 142
     /**
143
-     * @param $seedersClasses
143
+     * @param Collection|null $seedersClasses
144 144
      */
145 145
     private function loadSeeders($seedersClasses)
146 146
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
             }
123 123
 
124 124
             // sort the classes that needed to be ordered
125
-            $orderedSeederClasses = $orderedSeederClasses->sortBy(function ($seederFullClassName) {
125
+            $orderedSeederClasses = $orderedSeederClasses->sortBy(function($seederFullClassName) {
126 126
                 // get the order number form the end of each class name
127 127
                 $orderNumber = substr($seederFullClassName, strpos($seederFullClassName, "_") + 1);
128 128
 
Please login to merge, or discard this patch.
app/Ship/Features/Tests/PhpUnit/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\Ship\Features\Tests\PhpUnit;
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/Ship/Features/Tests/PhpUnit/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/Ship/Parents/Tests/PhpUnit/TestCase.php 1 patch
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\Ship\Features\Tests\PhpUnit\CustomTestsHelpersTrait;
6 6
 use App\Ship\Features\Tests\PhpUnit\GeneralTestsHelpersTrait;
7
-use App\Ship\Features\Tests\PhpUnit\TestingTrait;
8 7
 use App\Ship\Features\Tests\PhpUnit\TestingUserTrait;
9 8
 use Faker\Generator;
10 9
 use Illuminate\Contracts\Console\Kernel as LaravelKernel;
Please login to merge, or discard this patch.
app/Ship/Parents/Tests/PhpUnit/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/Ship/Engine/Loaders/FactoriesLoaderTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $newFactoriesPath = '/app/Ship/Engine/Loaders/FactoryMixer';
24 24
 
25
-        App::singleton(Factory::class, function ($app) use ($newFactoriesPath) {
25
+        App::singleton(Factory::class, function($app) use ($newFactoriesPath) {
26 26
             $faker = $app->make(Generator::class);
27 27
 
28 28
             return Factory::construct($faker, base_path() . $newFactoriesPath);
Please login to merge, or discard this patch.
app/Ship/Engine/Loaders/MigrationsLoaderTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         if (File::isDirectory($directory)) {
43 43
 
44
-            App::afterResolving('migrator', function ($migrator) use ($directory) {
44
+            App::afterResolving('migrator', function($migrator) use ($directory) {
45 45
                 foreach ((array)$directory as $path) {
46 46
                     $migrator->path($path);
47 47
                 }
Please login to merge, or discard this patch.
app/Ship/Engine/Traits/FractalTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API
36 36
         if ($serializerName !== 'DataArray') {
37
-            app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) {
37
+            app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) {
38 38
                 switch ($serializerName) {
39 39
                     case 'JsonApi':
40 40
                         $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain'));
Please login to merge, or discard this patch.
app/Ship/Features/Criterias/Eloquent/CountCriteria.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,6 @@
 block discarded – undo
37 37
      */
38 38
     public function apply($model, PrettusRepositoryInterface $repository)
39 39
     {
40
-        return DB::table($model->getModel()->getTable())->select('*', DB::raw('count('.$this->field.') as total_count'))->groupBy($this->field);
40
+        return DB::table($model->getModel()->getTable())->select('*', DB::raw('count(' . $this->field . ') as total_count'))->groupBy($this->field);
41 41
     }
42 42
 }
Please login to merge, or discard this patch.