Passed
Push — master ( 88e104...0cbceb )
by Keoghan
01:25
created
src/Transformer.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -413,7 +413,7 @@
 block discarded – undo
413 413
     /**
414 414
      * Check if the Transformer instance has a given rule pack.
415 415
      *
416
-     * @param RulePack|string $rulePack
416
+     * @param RulePack $rulePack
417 417
      * @return bool
418 418
      */
419 419
     public function hasRulePack($rulePack) : bool
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $regex = str_replace(['.', '*'], ['\.', '([^\\.|]+)'], $fieldExpression);
282 282
         preg_match_all("/({$regex})/", $this->dataKeysForRegex, $matches, PREG_SET_ORDER);
283 283
 
284
-        return array_reduce($matches, function ($results, $match) {
284
+        return array_reduce($matches, function($results, $match) {
285 285
             $results[$match[0]] = array_slice($match, 2);
286 286
 
287 287
             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}/", $key);
471 471
             })
472 472
             ->merge(Arr::dot([$field => $result]));
Please login to merge, or discard this patch.