Passed
Push — master ( 2915de...908b7b )
by Arthur
03:36
created
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.