Failed Conditions
Push — master ( 0bbe18...211e20 )
by Moesjarraf
03:53
created
src/DataEnricher.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,6 @@
 block discarded – undo
137 137
      * Check if object has at leas one process property
138 138
      * 
139 139
      * @param \stdClass    $value
140
-     * @param Processor[]  $processors
141 140
      * @return boolean
142 141
      */
143 142
     protected function hasProcessorProperty($value)
Please login to merge, or discard this 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/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/Node.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
             $target = $target->getResult();
47 47
             $this->applyNodeResults($target);
48 48
         } elseif (is_array($target) || is_object($target)) {
49
-            foreach ($target as &$value) {         
49
+            foreach ($target as &$value) {
50 50
                 $this->applyNodeResults($value);
51 51
             }
52 52
         }
Please login to merge, or discard this patch.
src/DataEnricher/Processor.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -13,6 +13,7 @@  discard block
 block discarded – undo
13 13
      * Class constructor
14 14
      * 
15 15
      * @param string $property  Property key with the processing instruction
16
+     * @return void
16 17
      */
17 18
     public function __construct($property);
18 19
 
@@ -27,6 +28,7 @@  discard block
 block discarded – undo
27 28
      * Apply processing to a node
28 29
      * 
29 30
      * @param Node $node
31
+     * @return null|boolean
30 32
      */
31 33
     public function applyToNode(Node $node);
32 34
 }
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/Transform.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,8 @@
 block discarded – undo
103 103
      * 
104 104
      * @return mixed $result
105 105
      */
106
-    protected function resolveNodes($node) {
106
+    protected function resolveNodes($node)
107
+    {
107 108
         if (!$node instanceof Node) {
108 109
             return $node;
109 110
         }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -209,7 +209,6 @@  discard block
 block discarded – undo
209 209
      * 
210 210
      * @param string $data
211 211
      * @param string $key          The public key
212
-     * @param string $passphrase
213 212
      * @param int $padding
214 213
      * 
215 214
      * @return string
@@ -293,10 +292,9 @@  discard block
 block discarded – undo
293 292
      * @param string $data
294 293
      * @param string $signature
295 294
      * @param string $key         The public key
296
-     * @param string $passphrase
297 295
      * @param int $signature_alg
298 296
      * 
299
-     * @return string
297
+     * @return integer
300 298
      */
301 299
     function verify_signature($data, $signature, $key, $signature_alg = OPENSSL_ALGO_SHA1)
302 300
     {
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.