Completed
Push — master ( 7b85f5...35d881 )
by Arthur
02:39
created
src/Concerns/ResolvesValidation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             ->validate();
25 25
     }
26 26
 
27
-    public function parentRules(){
27
+    public function parentRules() {
28 28
         return [];
29 29
     }
30 30
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         }
40 40
 
41 41
         foreach ($this->includes() as $key => $included) {
42
-            if (! array_key_exists($key, $rules)) {
42
+            if (!array_key_exists($key, $rules)) {
43 43
                 $rules[$key] = 'required';
44 44
             }
45 45
         }
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
         $filtered = [];
73 73
         $rules = collect($this->buildRules());
74 74
         $keys = $rules->keys();
75
-        $rules->each(function ($rules, $key) use ($original, $keys, &$filtered) {
75
+        $rules->each(function($rules, $key) use ($original, $keys, &$filtered) {
76 76
             //Allow for array or pipe-delimited rule-sets
77 77
             if (is_string($rules)) {
78 78
                 $rules = explode('|', $rules);
79 79
             }
80 80
             //In case a rule requires an element to be an array, look for nested rules
81
-            $nestedRules = $keys->filter(function ($otherKey) use ($key) {
81
+            $nestedRules = $keys->filter(function($otherKey) use ($key) {
82 82
                 return strpos($otherKey, "$key.") === 0;
83 83
             });
84 84
             //If the input must be an array, default missing nested rules to a wildcard
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
     protected function resolveValidation()
117 117
     {
118
-        if (! $this->passesValidation()) {
118
+        if (!$this->passesValidation()) {
119 119
             $this->failedValidation();
120 120
         }
121 121
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         }
140 140
 
141 141
         if (method_exists($this, 'afterValidator')) {
142
-            $validator->after(function ($validator) {
142
+            $validator->after(function($validator) {
143 143
                 $this->resolveAndCall($this, 'afterValidator', compact('validator'));
144 144
             });
145 145
         }
Please login to merge, or discard this patch.