Passed
Push — master ( 684bcb...2808dd )
by Sebastian
09:28
created
src/Request/Param/Validator/Integer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     
31 31
     protected function _validate()
32 32
     {
33
-        if(ConvertHelper::isInteger($this->value)) {
33
+        if (ConvertHelper::isInteger($this->value)) {
34 34
             return intval($this->value);
35 35
         }
36 36
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Url.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(!is_string($this->value)) {
30
+        if (!is_string($this->value)) {
31 31
             return '';
32 32
         }
33 33
         
34 34
         $info = parseURL($this->value);
35
-        if($info->isValid()) {
35
+        if ($info->isValid()) {
36 36
             return $this->value;
37 37
         }
38 38
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Numeric.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(is_numeric($this->value)) {
30
+        if (is_numeric($this->value)) {
31 31
             return $this->value * 1;
32 32
         }
33 33
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Json.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,26 +29,26 @@
 block discarded – undo
29 29
     
30 30
     protected function _validate()
31 31
     {
32
-        if(!is_string($this->value)) {
32
+        if (!is_string($this->value)) {
33 33
             return '';
34 34
         }
35 35
         
36 36
         $value = trim($this->value);
37 37
         
38
-        if(empty($value)) {
38
+        if (empty($value)) {
39 39
             return '';
40 40
         }
41 41
         
42 42
         // strictly validate for objects?
43
-        if($this->getBoolOption('arrays') === false)
43
+        if ($this->getBoolOption('arrays') === false)
44 44
         {
45
-            if(is_object(json_decode($value))) {
45
+            if (is_object(json_decode($value))) {
46 46
                 return $value;
47 47
             }
48 48
         }
49 49
         else
50 50
         {
51
-            if(is_array(json_decode($value, true))) {
51
+            if (is_array(json_decode($value, true))) {
52 52
                 return $value;
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
src/Request/Param/Validator/Regex.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(!is_scalar($this->value)) {
30
+        if (!is_scalar($this->value)) {
31 31
             return null;
32 32
         }
33 33
         
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
         // is a boolan, which is converted to an integer when
36 36
         // converted to string, which in turn can be validated
37 37
         // with a regex.
38
-        if(is_bool($this->value)) {
38
+        if (is_bool($this->value)) {
39 39
             return null;
40 40
         }
41 41
         
42 42
         $value = (string)$this->value;
43 43
         
44
-        if(preg_match($this->getStringOption('regex'), $value)) {
44
+        if (preg_match($this->getStringOption('regex'), $value)) {
45 45
             return $value;
46 46
         }
47 47
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Enum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     
30 30
     protected function _validate()
31 31
     {
32
-        if(in_array($this->value, $this->getArrayOption('values'))) {
32
+        if (in_array($this->value, $this->getArrayOption('values'))) {
33 33
             return $this->value;
34 34
         }
35 35
         
Please login to merge, or discard this patch.
src/VariableInfo/Renderer/HTML.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             str_replace(' ', '-', $this->type)
41 41
         );
42 42
         
43
-        if($this->info->getBoolOption('prepend-type') && !$this->info->isNull())
43
+        if ($this->info->getBoolOption('prepend-type') && !$this->info->isNull())
44 44
         {
45 45
             $typeLabel = '<span style="color:#1c2eb1" class="variable-type">'.$this->info->getType().'</span> ';
46 46
             $converted = $typeLabel.' '.$converted;
Please login to merge, or discard this patch.
src/VariableInfo/Renderer/String/Callable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     {
11 11
         $string = '';
12 12
         
13
-        if(is_string($this->value[0])) 
13
+        if (is_string($this->value[0])) 
14 14
         {
15 15
             $string .= $this->value[0].'::';
16 16
         } 
Please login to merge, or discard this patch.
src/XMLHelper/Converter/Decorator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
     
108 108
     protected function detectAttributes()
109 109
     {
110
-        if(!$this->options['@attributes']) {
110
+        if (!$this->options['@attributes']) {
111 111
             return;
112 112
         }
113 113
         
114 114
         $attributes = $this->subject->attributes();
115 115
         
116
-        if(!empty($attributes)) 
116
+        if (!empty($attributes)) 
117 117
         {
118 118
             $this->result['@attributes'] = array_map('strval', iterator_to_array($attributes));
119 119
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $children = $this->subject;
125 125
         $depth = $this->options['depth'] - 1;
126 126
         
127
-        if($depth <= 0) 
127
+        if ($depth <= 0) 
128 128
         {
129 129
             $children = [];
130 130
         }
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
             
138 138
             $decorator->options = ['depth' => $depth] + $this->options;
139 139
             
140
-            if(isset($this->result[$name])) 
140
+            if (isset($this->result[$name])) 
141 141
             {
142
-                if(!is_array($this->result[$name])) 
142
+                if (!is_array($this->result[$name])) 
143 143
                 {
144 144
                     $this->result[$name] = [$this->result[$name]];
145 145
                 }
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
         // json encode non-whitespace element simplexml text values.
159 159
         $text = trim((string)$this->subject);
160 160
         
161
-        if(strlen($text)) 
161
+        if (strlen($text)) 
162 162
         {
163
-            if($this->options['@text']) 
163
+            if ($this->options['@text']) 
164 164
             {
165 165
                 $this->result['@text'] = $text;
166 166
             } 
Please login to merge, or discard this patch.