Completed
Push — master ( f1b3fc...e97c85 )
by Nick
02:27
created
src/Query/Guard/Policy/Factory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     /**
15 15
      * Create a new Factory instance.
16 16
      *
17
-     * @param mixed|null $defaultPolicy
17
+     * @param \Closure $defaultPolicy
18 18
      */
19 19
     public function __construct($defaultPolicy = null)
20 20
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function fromArray(array $rules)
77 77
     {
78
-        return $this->fromCallback(function ($guard) use ($rules) {
78
+        return $this->fromCallback(function($guard) use ($rules) {
79 79
             foreach ($rules as $method => $arguments) {
80 80
                 $guard->allow($method, $arguments);
81 81
             }
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
     {
100 100
         return array_build(
101 101
             preg_split('#(?<=\))\s*(?=[a-z])#i', $input), // split on spaces between e.g. `where(*) orderBy(*)`
102
-            function ($index, $rule) {
102
+            function($index, $rule) {
103 103
 
104
-                if (!preg_match('#^(?<method>[a-z]+)\((?<args>[^)]*)\)$#i', $rule, $clause)) {
105
-                    throw new InvalidArgumentException('Could not parse rule [' . $rule . ']');
104
+                if ( ! preg_match('#^(?<method>[a-z]+)\((?<args>[^)]*)\)$#i', $rule, $clause)) {
105
+                    throw new InvalidArgumentException('Could not parse rule ['.$rule.']');
106 106
                 }
107 107
 
108 108
                 return [
Please login to merge, or discard this patch.
src/ScriptGenerator/Console/Command.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
     /**
179 179
      * Prompt user to confirm.
180 180
      *
181
-     * @return bool
181
+     * @return string
182 182
      */
183 183
     protected function isConfirmed()
184 184
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         return array_filter(
119 119
             $this->classFinder->findClasses(app_path()),
120
-            function ($className) {
120
+            function($className) {
121 121
                 return is_subclass_of($className, AcceptsEloquentJsQueries::class);
122 122
             }
123 123
         );
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         $metadata = $this->inspector->inspect(new $className);
135 135
 
136
-        if (!$metadata->endpoint) {
136
+        if ( ! $metadata->endpoint) {
137 137
             $metadata->endpoint = $this->findMissingEndpoint($className);
138 138
         }
139 139
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $this->table(
171 171
             ['Model', 'Endpoint'],
172
-            array_map(function ($metadata) {
172
+            array_map(function($metadata) {
173 173
                 return [$metadata->name, $metadata->endpoint];
174 174
             }, $models)
175 175
         );
Please login to merge, or discard this patch.
src/EloquentJsServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function register()
28 28
     {
29
-        $this->app->singleton('eloquentjs.query', function ($app) {
29
+        $this->app->singleton('eloquentjs.query', function($app) {
30 30
             return $app[Interpreter::class]->parse($app['request']);
31 31
         });
32 32
 
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
 
88 88
         $app->when(GenericController::class)
89 89
             ->needs(AcceptsEloquentJsQueries::class)
90
-            ->give(function ($app) {
90
+            ->give(function($app) {
91 91
                 if ($resource = $app['eloquentjs.router']->getCurrentResource()) {
92 92
                     return $app->make($resource);
93 93
                 }
94 94
             });
95 95
 
96
-        $router->macro('eloquent', function ($uri, $resource, $options = []) use ($app) {
96
+        $router->macro('eloquent', function($uri, $resource, $options = []) use ($app) {
97 97
             $app['eloquentjs.router']->addRoute($uri, $resource, $options);
98 98
         });
99 99
     }
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
      */
106 106
     protected function setDefaultPolicy()
107 107
     {
108
-        $this->app->bind(Factory::class, function () {
108
+        $this->app->bind(Factory::class, function() {
109 109
             return new Factory(
110
-                function (Builder $guard) {
110
+                function(Builder $guard) {
111 111
                     $guard->allow('select');
112 112
                     $guard->allow('distinct');
113 113
                     $guard->allow('where');
Please login to merge, or discard this patch.
src/Query/Interpreter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     protected function getMethodCalls(array $calls)
34 34
     {
35
-        return array_map(function ($call) {
35
+        return array_map(function($call) {
36 36
             return new MethodCall($call[0], $call[1]);
37 37
         }, $calls);
38 38
     }
Please login to merge, or discard this patch.
src/Query/Guard/Policy/Rule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 
118 118
         $alternates = explode('|', $pattern);
119 119
 
120
-        return !! array_first($alternates, function ($index, $pattern) use ($value) {
120
+        return ! ! array_first($alternates, function($index, $pattern) use ($value) {
121 121
 
122 122
             $firstCharacter = substr($pattern, 0, 1);
123 123
             $remainder = substr($pattern, 1);
Please login to merge, or discard this patch.
src/Query/Guard/Policy/Policy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function test(MethodCall $call)
31 31
     {
32
-        return !! array_first($this->rules, function ($index, $rule) use ($call) {
32
+        return ! ! array_first($this->rules, function($index, $rule) use ($call) {
33 33
             return $rule->test($call);
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
src/ScriptGenerator/Console/InputParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function parse($classList, $namespace)
15 15
     {
16 16
         return array_map(
17
-            function ($className) use ($namespace) {
17
+            function($className) use ($namespace) {
18 18
                 return $this->getFullyQualifiedClassName($className, $namespace);
19 19
             },
20 20
             array_map('trim', explode(',', $classList))
Please login to merge, or discard this patch.
src/Controllerless/RouteRegistrar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@
 block discarded – undo
54 54
                     $this->routeOptions($options)
55 55
                 );
56 56
 
57
-                $router->put($uri, $this->controller . '@updateAll');
58
-                $router->delete($uri, $this->controller . '@destroyAll');
57
+                $router->put($uri, $this->controller.'@updateAll');
58
+                $router->delete($uri, $this->controller.'@destroyAll');
59 59
             }
60 60
         );
61 61
     }
Please login to merge, or discard this patch.