Passed
Push — master ( 2915de...908b7b )
by Arthur
03:36
created
src/Action.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
             $this->failHook($exception);
62 62
         }
63 63
 
64
-        return tap($value, function ($value) {
64
+        return tap($value, function($value) {
65 65
             $this->successHook($value);
66 66
         });
67 67
     }
68 68
 
69 69
     public function resolveBeforeHook()
70 70
     {
71
-        $method = 'as' . Str::studly($this->runningAs);
71
+        $method = 'as'.Str::studly($this->runningAs);
72 72
 
73 73
         if (method_exists($this, $method)) {
74 74
             return $this->resolveAndCall($this, $method);
Please login to merge, or discard this patch.
src/Attributes/Rules/GeneralRules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         return $this->rule("exists:$table,$column");
22 22
     }
23 23
 
24
-    public function filled(){
24
+    public function filled() {
25 25
         return $this->rule('filled');
26 26
     }
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/Attributes/Rules/StringRules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@
 block discarded – undo
23 23
 
24 24
     public function endsWith(string ...$values)
25 25
     {
26
-        return $this->rule('ends_with:' . implode(',', $values));
26
+        return $this->rule('ends_with:'.implode(',', $values));
27 27
     }
28 28
 
29 29
     public function in(string ...$values)
30 30
     {
31
-        return $this->rule('in:' . implode(',', $values));
31
+        return $this->rule('in:'.implode(',', $values));
32 32
     }
33 33
 
34
-    public function ip(){
34
+    public function ip() {
35 35
         return $this->rule('ip');
36 36
     }
37 37
 
38
-    public function ipv4(){
38
+    public function ipv4() {
39 39
         return $this->rule('ipv4');
40 40
     }
41 41
 
42
-    public function ipv6(){
42
+    public function ipv6() {
43 43
         return $this->rule('ipv6');
44 44
     }
45 45
 
46
-    public function json(){
46
+    public function json() {
47 47
         return $this->rule('json');
48 48
     }
49 49
 }
50 50
\ No newline at end of file
Please login to merge, or discard this patch.
src/Concerns/ResolvesValidation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         }
41 41
 
42 42
         foreach ($this->includes() as $key => $included) {
43
-            if (! array_key_exists($key, $rules)) {
43
+            if (!array_key_exists($key, $rules)) {
44 44
                 $rules[$key] = 'required';
45 45
             }
46 46
         }
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
         $filtered = [];
76 76
         $rules = collect($this->buildRules());
77 77
         $keys = $rules->keys();
78
-        $rules->each(function ($rules, $key) use ($original, $keys, &$filtered) {
78
+        $rules->each(function($rules, $key) use ($original, $keys, &$filtered) {
79 79
             //Allow for array or pipe-delimited rule-sets
80 80
             if (is_string($rules)) {
81 81
                 $rules = explode('|', $rules);
82 82
             }
83 83
             //In case a rule requires an element to be an array, look for nested rules
84
-            $nestedRules = $keys->filter(function ($otherKey) use ($key) {
84
+            $nestedRules = $keys->filter(function($otherKey) use ($key) {
85 85
                 return strpos($otherKey, "$key.") === 0;
86 86
             });
87 87
             //If the input must be an array, default missing nested rules to a wildcard
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
 
119 119
     protected function resolveValidation()
120 120
     {
121
-        if (! $this->passesValidation()) {
121
+        if (!$this->passesValidation()) {
122 122
             $this->failedValidation();
123 123
         }
124 124
 
125 125
         return $this;
126 126
     }
127 127
 
128
-    protected function setValidatorInstance($validator){
128
+    protected function setValidatorInstance($validator) {
129 129
         $this->validator = $validator;
130 130
     }
131 131
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         }
147 147
 
148 148
         if (method_exists($this, 'afterValidator')) {
149
-            $validator->after(function ($validator) {
149
+            $validator->after(function($validator) {
150 150
                 $this->resolveAndCall($this, 'afterValidator', compact('validator'));
151 151
             });
152 152
         }
Please login to merge, or discard this patch.
src/Attribute.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public static function optional()
88 88
     {
89
-        return tap(static::make(), function (Attribute $attribute) {
89
+        return tap(static::make(), function(Attribute $attribute) {
90 90
             $attribute->setRules(
91 91
                 collect($attribute->getRules())
92
-                    ->reject(function ($value) {
92
+                    ->reject(function($value) {
93 93
                         return $value === 'required';
94 94
                     })
95 95
                     ->toArray()
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function rule(...$rules)
123 123
     {
124
-        collect($rules)->each(function ($rule) {
124
+        collect($rules)->each(function($rule) {
125 125
             $this->setRules(
126 126
                 collect($this->extractRules($rule))
127 127
                     ->flatten()
Please login to merge, or discard this patch.