Failed Conditions
Push — master ( 211e20...fe879a )
by Moesjarraf
07:49
created
src/DataEnricher/Processor/Http.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $url = $node->getInstruction($this);
26 26
         
27
-        $type = (is_object($url) ? get_class($url) . ' ' : '') . gettype($url);
27
+        $type = (is_object($url) ? get_class($url).' ' : '').gettype($url);
28 28
         if (!assert(is_string($url), "Expected '{$this->property}' to be a string, but got a $type")) {
29 29
             return null;
30 30
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         }
46 46
 
47 47
         $client = new Client(['http_errors' => false]);
48
-        $promise = $client->getAsync($url)->then(function (Response $response) use ($node) {
48
+        $promise = $client->getAsync($url)->then(function(Response $response) use ($node) {
49 49
             $this->applyResult($node, $response);
50 50
         });
51 51
         
Please login to merge, or discard this patch.
src/DataEnricher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         }
93 93
         
94 94
         if (!is_object($source)) {
95
-            throw new \Exception("Data enricher on works on an object, not on a " . gettype($source));
95
+            throw new \Exception("Data enricher on works on an object, not on a ".gettype($source));
96 96
         }
97 97
         
98 98
         if (is_string($target)) {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     protected function hasProcessorProperty($value)
146 146
     {
147
-        $processorProps = array_map(function ($processor) {
147
+        $processorProps = array_map(function($processor) {
148 148
             return $processor->getProperty();
149 149
         }, $this->processors);
150 150
         
Please login to merge, or discard this patch.
src/DataEnricher/Processor/Merge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         
26 26
         if (isset($list) && !is_array($list)) {
27 27
             throw new \Exception("Unable to apply {$this->property} processing instruction:"
28
-                . " Expected an array, got a " . (is_object($list) ? get_class($list) . ' ' : '') . gettype($list));
28
+                . " Expected an array, got a ".(is_object($list) ? get_class($list).' ' : '').gettype($list));
29 29
         }
30 30
         
31 31
         $result = $this->execute((array)$list);
Please login to merge, or discard this patch.
src/DataEnricher/Processor/DateFormat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     {
22 22
         $instruction = $node->getInstruction($this);
23 23
         
24
-        if(!isset($instruction->date) && !isset($instruction->input)) {
24
+        if (!isset($instruction->date) && !isset($instruction->input)) {
25 25
             return;
26 26
         }
27 27
         
Please login to merge, or discard this patch.
src/DataEnricher/Processor/NumberFormat.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
         }
43 43
         
44 44
         $result = $currency ?
45
-            $number->formatCurrency($instruction->input, $currency) :
46
-            $number->format($instruction->input);
45
+            $number->formatCurrency($instruction->input, $currency) : $number->format($instruction->input);
47 46
         
48 47
         $node->setResult($result);
49 48
     }
Please login to merge, or discard this patch.
src/DataEnricher/Processor/Mustache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $template = $node->getInstruction($this);
29 29
         
30 30
         if (!is_string($template) && !is_array($template) && !is_object($template)) {
31
-            return trigger_error("Unable to parse given template of type: " . gettype($template), E_USER_WARNING);
31
+            return trigger_error("Unable to parse given template of type: ".gettype($template), E_USER_WARNING);
32 32
         }
33 33
         
34 34
         $result = $this->getParsedResult($template);
Please login to merge, or discard this patch.
src/DataEnricher/Processor/Sum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         
26 26
         if (isset($list) && !is_array($list)) {
27 27
             throw new \Exception("Unable to apply {$this->property} processing instruction:"
28
-                . " Expected an array, got a " . (is_object($list) ? get_class($list) . ' ' : '') . gettype($list));
28
+                . " Expected an array, got a ".(is_object($list) ? get_class($list).' ' : '').gettype($list));
29 29
         }
30 30
         
31 31
         $result = $this->execute((array)$list);
Please login to merge, or discard this patch.
src/DataEnricher/Processor/Hash.php 1 patch
Spacing   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
     public function md5($input, $hmac = null)
51 51
     {
52 52
         return $hmac ?
53
-            hash_hmac('md5', $input, $hmac) :
54
-            hash('md5', $input);
53
+            hash_hmac('md5', $input, $hmac) : hash('md5', $input);
55 54
     }
56 55
     
57 56
     /**
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
     public function sha1($input, $hmac = null)
64 63
     {
65 64
         return $hmac ?
66
-            hash_hmac('sha1', $input, $hmac) :
67
-            hash('sha1', $input);
65
+            hash_hmac('sha1', $input, $hmac) : hash('sha1', $input);
68 66
     }
69 67
     
70 68
     /**
@@ -76,8 +74,7 @@  discard block
 block discarded – undo
76 74
     public function sha256($input, $hmac = null)
77 75
     {
78 76
         return $hmac ?
79
-            hash_hmac('sha256', $input, $hmac) :
80
-            hash('sha256', $input);
77
+            hash_hmac('sha256', $input, $hmac) : hash('sha256', $input);
81 78
     }
82 79
     
83 80
     /**
@@ -89,8 +86,7 @@  discard block
 block discarded – undo
89 86
     public function sha512($input, $hmac = null)
90 87
     {
91 88
         return $hmac ?
92
-            hash_hmac('sha512', $input, $hmac) :
93
-            hash('sha512', $input);
89
+            hash_hmac('sha512', $input, $hmac) : hash('sha512', $input);
94 90
     }
95 91
     
96 92
     /**
@@ -102,7 +98,6 @@  discard block
 block discarded – undo
102 98
     public function crc32($input, $hmac = null)
103 99
     {
104 100
         return $hmac ?
105
-            hash_hmac('crc32', $input, $hmac) :
106
-            hash('crc32', $input);
101
+            hash_hmac('crc32', $input, $hmac) : hash('crc32', $input);
107 102
     }
108 103
 }
Please login to merge, or discard this patch.