Passed
Pull Request — master (#5)
by
unknown
09:21
created
src/Transform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
      */
101 101
     protected function constructRule($rule, $arguments = []): string
102 102
     {
103
-        return $rule . (! empty($arguments) ? ':' . implode(',', $arguments) : '');
103
+        return $rule . (!empty($arguments) ? ':' . implode(',', $arguments) : '');
104 104
     }
105 105
 
106 106
     /**
Please login to merge, or discard this patch.
src/Transformer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         $regex = str_replace(['.', '*'], ['\.', '([^\\.|]+)'], $fieldExpression);
283 283
         preg_match_all("/({$regex})/", $this->dataKeysForRegex, $matches, PREG_SET_ORDER);
284 284
 
285
-        return array_reduce($matches, function ($results, $match) {
285
+        return array_reduce($matches, function($results, $match) {
286 286
             $results[$match[0]] = array_slice($match, 2);
287 287
 
288 288
             return $results;
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      */
349 349
     protected function validateRule($rule): string
350 350
     {
351
-        if (! isset($this->ruleMethods[$this->getRuleMethod($rule)])) {
351
+        if (!isset($this->ruleMethods[$this->getRuleMethod($rule)])) {
352 352
             throw new InvalidRule($rule);
353 353
         }
354 354
 
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
         $rulePackClass = $this->getClassName($rulePack);
397 397
         $rulePack = new $rulePackClass;
398 398
 
399
-        if (! ($rulePack instanceof RulePack)) {
399
+        if (!($rulePack instanceof RulePack)) {
400 400
             throw new \UnexpectedValueException('RulePack must be an instance of ' . RulePack::class);
401 401
         }
402 402
 
403
-        if (! $this->hasRulePack($rulePack)) {
403
+        if (!$this->hasRulePack($rulePack)) {
404 404
             $this->rulePacks[$rulePackClass] = $rulePack->transformer($this);
405 405
 
406 406
             $ruleMethods = array_fill_keys($rulePack->provides(), $rulePackClass);
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     protected function replaceDataValue($field, $result)
467 467
     {
468 468
         $this->data = $this->data
469
-            ->reject(function ($value, $key) use ($field) {
469
+            ->reject(function($value, $key) use ($field) {
470 470
                 return preg_match("/^{$field}$|^{$field}\./", $key);
471 471
             })
472 472
             ->merge(Arr::dot([$field => $result]));
Please login to merge, or discard this patch.