Completed
Push — master ( f89e11...f7925b )
by Arthur
03:41 queued 10s
created
src/Action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             $this->failHook($exception);
58 58
         }
59 59
 
60
-        return tap($value, function ($value) {
60
+        return tap($value, function($value) {
61 61
             $this->successHook($value);
62 62
         });
63 63
     }
Please login to merge, or discard this patch.
src/Concerns/SuccessHook.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 
24 24
         //BIND the value to the first parameter with the correct type
25 25
         collect($parameters)
26
-            ->filter(function (\ReflectionParameter $parameter) {
26
+            ->filter(function(\ReflectionParameter $parameter) {
27 27
                 return $parameter->hasType();
28 28
             })
29
-            ->filter(function (\ReflectionParameter $parameter) use ($result) {
29
+            ->filter(function(\ReflectionParameter $parameter) use ($result) {
30 30
                 return (gettype($result) === 'object' ? get_class($result) : gettype($result)) === $parameter->getType()->getName();
31 31
             })
32
-            ->each(function (\ReflectionParameter $parameter) use ($result, &$extraParameter) {
32
+            ->each(function(\ReflectionParameter $parameter) use ($result, &$extraParameter) {
33 33
                 $extraParameter = [$parameter->getName() => $result];
34 34
 
35 35
                 return false;
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         //IF there's not a parameter with the same name as the value type
44 44
         //CHOOSE the first value that doesn't have a type
45 45
         collect($parameters)
46
-            ->filter(function (\ReflectionParameter $parameter) {
47
-                return ! $parameter->hasType();
46
+            ->filter(function(\ReflectionParameter $parameter) {
47
+                return !$parameter->hasType();
48 48
             })
49
-            ->each(function (\ReflectionParameter $parameter) use ($result, &$extraParameter) {
49
+            ->each(function(\ReflectionParameter $parameter) use ($result, &$extraParameter) {
50 50
                 if ($extraParameter === null) {
51 51
                     $extraParameter = [$parameter->getName() => $result];
52 52
                 } elseif (strcasecmp(substr(strrchr(get_class($result), '\\'), 1), $parameter->getName()) == 0) {
Please login to merge, or discard this patch.
src/Concerns/RunsAsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             return $this->jsonResponse($result, $request);
32 32
         }
33 33
 
34
-        if (method_exists($this, 'htmlResponse') && ! $request->wantsJson()) {
34
+        if (method_exists($this, 'htmlResponse') && !$request->wantsJson()) {
35 35
             return $this->htmlResponse($result, $request);
36 36
         }
37 37
 
Please login to merge, or discard this patch.
src/Concerns/FailHook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     protected function failHook(Throwable $exception)
10 10
     {
11
-        if (! method_exists($this, 'onFail')) {
11
+        if (!method_exists($this, 'onFail')) {
12 12
             throw $exception;
13 13
         }
14 14
         $this->resolveAndCall($this, 'onFail', compact('exception'));
Please login to merge, or discard this patch.
src/Concerns/ResolvesMethodDependencies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     protected function resolveAndCall($instance, $method, $extras = [])
14 14
     {
15 15
         if (!method_exists($instance, $method)) {
16
-            throw new MethodDoesNotExistException("method $method not found on " . get_class($instance));
16
+            throw new MethodDoesNotExistException("method $method not found on ".get_class($instance));
17 17
         }
18 18
 
19 19
         $parameters = $this->resolveMethodDependencies($instance, $method, $extras);
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $reflector = new ReflectionMethod($instance, $method);
27 27
 
28
-        $handler = function ($parameter) use ($extras) {
28
+        $handler = function($parameter) use ($extras) {
29 29
             return $this->resolveDependency($parameter, $extras);
30 30
         };
31 31
 
Please login to merge, or discard this patch.
src/Concerns/ResolvesAuthorization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     protected function resolveAuthorization()
11 11
     {
12
-        if (! $this->passesAuthorization()) {
12
+        if (!$this->passesAuthorization()) {
13 13
             $this->failedAuthorization();
14 14
         }
15 15
 
Please login to merge, or discard this patch.
src/Attribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $attribute = static::make();
59 59
         $attribute->setRules(
60 60
             collect($attribute->getRules())
61
-                ->reject(function ($value) {
61
+                ->reject(function($value) {
62 62
                     return $value === 'required';
63 63
                 })
64 64
                 ->toArray()
Please login to merge, or discard this patch.
src/Concerns/ResolveCasting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
     protected function resolveAttributeCasting()
20 20
     {
21 21
         $attributes = new Collection($this->rules());
22
-        $attributes = (new Collection($this->rules()))->filter(function ($rule) {
22
+        $attributes = (new Collection($this->rules()))->filter(function($rule) {
23 23
             return $rule instanceof Attribute;
24 24
         });
25 25
 
26 26
         $data = $this->validated();
27 27
 
28
-        $castedValues = $attributes->intersectByKeys($this->validated())->map(function (Attribute $value, $key) {
28
+        $castedValues = $attributes->intersectByKeys($this->validated())->map(function(Attribute $value, $key) {
29 29
             return $value->cast($this->validated()[$key]);
30 30
         });
31 31
 
Please login to merge, or discard this patch.
src/Concerns/ResolveDefaults.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
     protected function resolveAttributeDefaults()
30 30
     {
31 31
         $defaults = collect($this->rules())
32
-            ->filter(function ($rule, $key) {
32
+            ->filter(function($rule, $key) {
33 33
                 return $rule instanceof Attribute && $rule->hasDefault();
34 34
             })
35
-            ->map(function (Attribute $attribute) {
35
+            ->map(function(Attribute $attribute) {
36 36
                 return $attribute->getDefault();
37 37
             })
38 38
             ->toArray();
Please login to merge, or discard this patch.