Completed
Push — master ( e16ac9...cdb9e2 )
by Robin
05:50
created
src/Transformer.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@
 block discarded – undo
388 388
     /**
389 389
      * Check if the Transformer instance has a given rule pack.
390 390
      *
391
-     * @param RulePack|String $rulePack
391
+     * @param RulePack $rulePack
392 392
      * @return bool
393 393
      */
394 394
     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
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         $regex = str_replace(['.', '*'], ['\.', '([^\\.|]+)'], $fieldExpression);
276 276
         preg_match_all("/({$regex})/", $this->dataKeysForRegex, $matches, PREG_SET_ORDER);
277 277
 
278
-        return array_reduce($matches, function ($results, $match) {
278
+        return array_reduce($matches, function($results, $match) {
279 279
             $results[$match[0]] = array_slice($match, 2);
280 280
 
281 281
             return $results;
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      */
324 324
     protected function validateRule($rule) : string
325 325
     {
326
-        if ( ! isset($this->ruleMethods[$this->getRuleMethod($rule)])) {
326
+        if (!isset($this->ruleMethods[$this->getRuleMethod($rule)])) {
327 327
             throw new InvalidRule($rule);
328 328
         }
329 329
 
@@ -371,11 +371,11 @@  discard block
 block discarded – undo
371 371
         $rulePackClass = $this->getClassName($rulePack);
372 372
         $rulePack = new $rulePackClass;
373 373
 
374
-        if ( ! ($rulePack instanceof RulePack)) {
374
+        if (!($rulePack instanceof RulePack)) {
375 375
             throw new UnexpectedValueException('RulePack must be an instance of ' . RulePack::class);
376 376
         }
377 377
 
378
-        if ( ! $this->hasRulePack($rulePack)) {
378
+        if (!$this->hasRulePack($rulePack)) {
379 379
             $this->rulePacks[$rulePackClass] = $rulePack->transformer($this);
380 380
 
381 381
             $ruleMethods = array_fill_keys($rulePack->provides(), $rulePackClass);
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     protected function replaceDataValue($field, $result)
442 442
     {
443 443
         $this->data = $this->data
444
-            ->reject(function ($value, $key) use ($field) {
444
+            ->reject(function($value, $key) use ($field) {
445 445
                 return preg_match("/^{$field}/", $key);
446 446
             })
447 447
             ->merge(Arr::dot([$field => $result]));
Please login to merge, or discard this patch.