Passed
Pull Request — master (#16)
by Arthur
20:03 queued 12:23
created
src/Modules/Account/Database/factories/AccountFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Faker\Generator as Faker;
4 4
 use Modules\Account\Entities\Account;
5 5
 
6
-$factory->define(Account::class, function (Faker $faker) {
6
+$factory->define(Account::class, function(Faker $faker) {
7 7
     return [
8 8
          'user_id'           => 1,
9 9
          'username'          => $faker->unique()->safeEmail,
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      ];
22 22
 });
23 23
 
24
- $factory->state(Account::class, 'OSRS', function (Faker $faker) {
24
+ $factory->state(Account::class, 'OSRS', function(Faker $faker) {
25 25
      return [
26 26
          'game'                  => 'OSRS',
27 27
          'bank_pin'              => $faker->randomNumber(4, true),
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
                      'amount'  => 1,
73 73
                  ],
74 74
              ],
75
-             'equipment'      => [],
75
+             'equipment'      => [ ],
76 76
              'grand_exchange' => [
77 77
                  [
78 78
                      'item_id' => 5,
79 79
                      'amount'  => 2,
80 80
                  ],
81 81
              ],
82
-             'inventory' => [],
82
+             'inventory' => [ ],
83 83
          ],
84 84
      ];
85 85
  });
86 86
 
87
- $factory->state(Account::class, 'RS3', function (Faker $faker) {
87
+ $factory->state(Account::class, 'RS3', function(Faker $faker) {
88 88
      return [
89 89
          'game'                  => 'RS3',
90 90
          'bank_pin'              => $faker->randomNumber(4, true),
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/Transformer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 {
18 18
     use IncludesRelations;
19 19
 
20
-    public $include = [];
20
+    public $include = [ ];
21 21
 
22
-    public $available = [];
22
+    public $available = [ ];
23 23
 
24 24
     public function __construct($resource)
25 25
     {
@@ -57,6 +57,6 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function transformResource()
59 59
     {
60
-        return [];
60
+        return [ ];
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/IncludesRelations.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             return explode(',', $request->include);
27 27
         }
28 28
 
29
-        return [];
29
+        return [ ];
30 30
     }
31 31
 
32 32
     /**
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     public function compileRelations()
36 36
     {
37 37
         $requestedRelations = $this->parseRequestIncludeParameter();
38
-        $relations = [];
38
+        $relations = [ ];
39 39
         foreach ($requestedRelations as $requestedRelation) {
40
-            if (isset($this->available[$requestedRelation])) {
41
-                $relations[$requestedRelation] = $this->available[$requestedRelation];
40
+            if (isset($this->available[ $requestedRelation ])) {
41
+                $relations[ $requestedRelation ] = $this->available[ $requestedRelation ];
42 42
             }
43 43
         }
44 44
         $merge = array_merge($this->include, $relations);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if (is_array($relation)) {
57 57
             $this->include = array_merge($this->include, $relation);
58 58
         } else {
59
-            $this->include[] = $relation;
59
+            $this->include[ ] = $relation;
60 60
         }
61 61
 
62 62
         return $this;
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
 
65 65
     protected function includeRelations()
66 66
     {
67
-        $relations = [];
67
+        $relations = [ ];
68 68
         if ($this->resource instanceof Model) {
69 69
             $relations = $this->compileRelations();
70 70
             foreach ($relations as $relation => $transformer) {
71 71
                 $relationMethodName = 'transform'.ucfirst(strtolower($relation));
72 72
                 if (method_exists($this, $relationMethodName)) {
73
-                    $relations[$relation] = $this->$relationMethodName($this->resource->$relation);
73
+                    $relations[ $relation ] = $this->$relationMethodName($this->resource->$relation);
74 74
                 } else {
75 75
                     if ($this->resource->$relation instanceof Model) {
76
-                        $relations[$relation] = $transformer::resource($this->whenLoaded($relation));
76
+                        $relations[ $relation ] = $transformer::resource($this->whenLoaded($relation));
77 77
                     } elseif ($this->resource->$relation instanceof Collection) {
78
-                        $relations[$relation] = $transformer::collection($this->whenLoaded($relation));
78
+                        $relations[ $relation ] = $transformer::collection($this->whenLoaded($relation));
79 79
                     }
80 80
                 }
81 81
             }
Please login to merge, or discard this patch.