Passed
Push — master ( f19e46...da3214 )
by Arthur
47:02 queued 22:02
created
src/Foundation/Tests/TransformerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function __construct($user)
64 64
     {
65 65
         $this->user = $user;
66
-        parent::__construct([]);
66
+        parent::__construct([ ]);
67 67
     }
68 68
 }
69 69
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 {
76 76
     public function toArray($request)
77 77
     {
78
-        return [];
78
+        return [ ];
79 79
     }
80 80
 
81 81
     public function transformUser(MachineTestModel $machine)
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
 class UserIncludedMachineTestTransformer extends MachineTestTransformer
88 88
 {
89
-    public $include = ['user'];
89
+    public $include = [ 'user' ];
90 90
 }
91 91
 
92 92
 class UserTestTransformer extends Transformer
93 93
 {
94 94
     public function toArray($request)
95 95
     {
96
-        return [];
96
+        return [ ];
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/Transformer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 {
31 31
     use IncludesRelations, HandlesLimit;
32 32
 
33
-    public $include = [];
33
+    public $include = [ ];
34 34
 
35
-    public $available = [];
35
+    public $available = [ ];
36 36
 
37 37
     public $limit = -1;
38 38
 
39
-    public function __construct($resource, $relations = [])
39
+    public function __construct($resource, $relations = [ ])
40 40
     {
41 41
         if (!($resource instanceof Model)) {
42 42
             throw new Exception('Object passed to the transformer resource method is not a eloquent model', 500);
43 43
         }
44 44
         $this->resource = $resource;
45
-        $relations = is_array($relations) ? $relations : [];
45
+        $relations = is_array($relations) ? $relations : [ ];
46 46
         parent::__construct(self::loadRelations($resource, $relations));
47 47
     }
48 48
 
49
-    public static function resource($model, array $relations = []): self
49
+    public static function resource($model, array $relations = [ ]): self
50 50
     {
51 51
         return new static($model, $relations);
52 52
     }
53 53
 
54
-    public static function collection($resource, array $relations = [])
54
+    public static function collection($resource, array $relations = [ ])
55 55
     {
56 56
         if (!($resource instanceof Collection)) {
57 57
             throw new Exception('Object passed to the transformer collection method is not a collection', 500);
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Tests/HttpTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,32 +58,32 @@
 block discarded – undo
58 58
         }
59 59
 
60 60
         if ($unwrap) {
61
-            return json_decode($content, true)['data'] ?? json_decode($content, true);
61
+            return json_decode($content, true)[ 'data' ] ?? json_decode($content, true);
62 62
         }
63 63
 
64 64
         return json_decode($content, true);
65 65
     }
66 66
 
67
-    protected function http(string $method, string $route, array $payload = [])
67
+    protected function http(string $method, string $route, array $payload = [ ])
68 68
     {
69 69
         return $this->sendRequest($method, $route, $payload, true);
70 70
     }
71 71
 
72
-    private function sendRequest(string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
72
+    private function sendRequest(string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
73 73
     {
74 74
         return $this->json($method, env('API_URL').$route, $payload, $authenticated ? [
75 75
             'Authorization' => 'Bearer '.$this->getAuth0Service()->getTestUserToken()->id_token,
76
-        ] : []);
76
+        ] : [ ]);
77 77
     }
78 78
 
79
-    protected function sendRequestWithToken($token, string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
79
+    protected function sendRequestWithToken($token, string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
80 80
     {
81 81
         return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [
82 82
             'Authorization' => 'Bearer '.$token,
83
-        ] : []);
83
+        ] : [ ]);
84 84
     }
85 85
 
86
-    protected function httpNoAuth(string $method, string $route, array $payload = [])
86
+    protected function httpNoAuth(string $method, string $route, array $payload = [ ])
87 87
     {
88 88
         return $this->sendRequest($method, $route, $payload, false);
89 89
     }
Please login to merge, or discard this patch.
src/Foundation/Kernels/HttpKernel.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
     protected $middlewareGroups = [
31 31
         'web' => [
32 32
             //\Foundation\Middleware\EncryptCookies::class,
33
-             //\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
-             //\Illuminate\Session\Middleware\StartSession::class,
35
-             //\Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
-             //\Foundation\Middleware\VerifyCsrfToken::class,
33
+                //\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
+                //\Illuminate\Session\Middleware\StartSession::class,
35
+                //\Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
+                //\Foundation\Middleware\VerifyCsrfToken::class,
37 37
             //\Illuminate\Routing\Middleware\SubstituteBindings::class,
38 38
         ],
39 39
 
Please login to merge, or discard this patch.