Passed
Push — master ( 52d896...76ecf7 )
by Lukas
02:39
created
src/Pipe/LazyPropertiesPipe.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function pipe($resource, Context $context, Path $path, $data)
35 35
     {
36
-        if (! $context instanceof HasSchema) {
36
+        if (!$context instanceof HasSchema) {
37 37
             return $data;
38 38
         }
39 39
 
40 40
         $transformer = $this->transformerRepository->getTransformer($resource);
41 41
 
42
-        if (! $transformer instanceof HasLazyProperties) {
42
+        if (!$transformer instanceof HasLazyProperties) {
43 43
             return $data;
44 44
         }
45 45
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         return array_reduce(
51 51
             $properties,
52
-            function (array $data, string $key) use ($resource, $transformer) {
52
+            function(array $data, string $key) use ($resource, $transformer) {
53 53
                 $data[$key] = $data[$key] ?? $transformer->{$key}($resource);
54 54
 
55 55
                 return $data;
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 
61 61
     private function getProperties(array $schema): array
62 62
     {
63
-        return array_map(function ($value, $key) {
63
+        return array_map(function($value, $key) {
64 64
             return is_string($value) ? $value : $key;
65 65
         }, $schema, array_keys($schema));
66 66
     }
67 67
 
68 68
     private function getPathSchema(Path $path, array $schema): array
69 69
     {
70
-        $segments = array_filter($path->getSegments(), function ($segment) {
71
-            return ! is_numeric($segment);
70
+        $segments = array_filter($path->getSegments(), function($segment) {
71
+            return !is_numeric($segment);
72 72
         });
73 73
 
74 74
         return $this->arrayGet($schema, $segments, []);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     private function arrayGet(array $array, array $path, $default): array
78 78
     {
79 79
         foreach ($path as $key) {
80
-            if (! array_key_exists($key, $array)) {
80
+            if (!array_key_exists($key, $array)) {
81 81
                 return $default;
82 82
             }
83 83
 
Please login to merge, or discard this patch.
src/Pipe/AccessControlPipe.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     private function assertCanAccess($resource, Context $context, Path $path): void {
64 64
         $transformer = $this->transformerRepository->getTransformer($resource);
65 65
 
66
-        if (! $transformer instanceof HasAccessConfig) {
66
+        if (!$transformer instanceof HasAccessConfig) {
67 67
             return;
68 68
         }
69 69
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         foreach ($allAcl as $acl) {
79 79
             $guard = $this->guardByName[$acl];
80 80
 
81
-            if (! $guard->canAccess($resource, $context)) {
81
+            if (!$guard->canAccess($resource, $context)) {
82 82
                 throw new AccessDeniedException('test');
83 83
             }
84 84
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     private function pick(array $array, array $keys)
88 88
     {
89
-        return array_filter($array, function (string $key) use ($keys): bool {
89
+        return array_filter($array, function(string $key) use ($keys): bool {
90 90
             return in_array($key, $keys, true);
91 91
         }, ARRAY_FILTER_USE_KEY);
92 92
     }
@@ -100,15 +100,15 @@  discard block
 block discarded – undo
100 100
 
101 101
     private function getProperties(array $schema): array
102 102
     {
103
-        return array_map(function ($value, $key) {
103
+        return array_map(function($value, $key) {
104 104
             return is_string($value) ? $value : $key;
105 105
         }, $schema, array_keys($schema));
106 106
     }
107 107
 
108 108
     private function getPathSchema(Path $path, array $schema): array
109 109
     {
110
-        $segments = array_filter($path->getSegments(), function ($segment) {
111
-            return ! is_numeric($segment);
110
+        $segments = array_filter($path->getSegments(), function($segment) {
111
+            return !is_numeric($segment);
112 112
         });
113 113
 
114 114
         return $this->arrayGet($schema, $segments, []);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     private function arrayGet(array $array, array $path, $default): array
118 118
     {
119 119
         foreach ($path as $key) {
120
-            if (! array_key_exists($key, $array)) {
120
+            if (!array_key_exists($key, $array)) {
121 121
                 return $default;
122 122
             }
123 123
 
Please login to merge, or discard this patch.