@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | * @param mixed $value |
52 | 52 | * @param array|null $serialized |
53 | 53 | */ |
54 | - public function __construct($value, $serialized=null) |
|
54 | + public function __construct($value, $serialized = null) |
|
55 | 55 | { |
56 | - if(is_array($serialized)) |
|
56 | + if (is_array($serialized)) |
|
57 | 57 | { |
58 | 58 | $this->parseSerialized($serialized); |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $this->value = $value; |
102 | 102 | $this->type = strtolower(gettype($value)); |
103 | 103 | |
104 | - if(is_array($value) && is_callable($value)) { |
|
104 | + if (is_array($value) && is_callable($value)) { |
|
105 | 105 | $this->type = self::TYPE_CALLABLE; |
106 | 106 | } |
107 | 107 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param bool $enable |
135 | 135 | * @return VariableInfo |
136 | 136 | */ |
137 | - public function enableType(bool $enable=true) : VariableInfo |
|
137 | + public function enableType(bool $enable = true) : VariableInfo |
|
138 | 138 | { |
139 | 139 | return $this->setOption('prepend-type', $enable); |
140 | 140 | } |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | { |
144 | 144 | $converted = $this->string; |
145 | 145 | |
146 | - if($this->getOption('prepend-type') === true && !$this->isNull()) |
|
146 | + if ($this->getOption('prepend-type') === true && !$this->isNull()) |
|
147 | 147 | { |
148 | - if($this->isString()) |
|
148 | + if ($this->isString()) |
|
149 | 149 | { |
150 | 150 | $converted = '"'.$converted.'"'; |
151 | 151 | } |
@@ -177,16 +177,16 @@ discard block |
||
177 | 177 | |
178 | 178 | $converted = $this->$varMethod(); |
179 | 179 | |
180 | - if($format === 'HTML') |
|
180 | + if ($format === 'HTML') |
|
181 | 181 | { |
182 | 182 | $converted = '<span style="color:#'.self::$colors[$type].'" class="variable-value-'.$this->type.'">'.$converted.'</span>'; |
183 | 183 | } |
184 | 184 | |
185 | - if($this->getOption('prepend-type') === true && !$this->isNull()) |
|
185 | + if ($this->getOption('prepend-type') === true && !$this->isNull()) |
|
186 | 186 | { |
187 | 187 | $typeLabel = $type; |
188 | 188 | |
189 | - switch($format) |
|
189 | + switch ($format) |
|
190 | 190 | { |
191 | 191 | case 'HTML': |
192 | 192 | $typeLabel = '<span style="color:#1c2eb1" class="variable-type">'.$type.'</span> '; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | // the array may not be encodable - for example if it contains |
217 | 217 | // broken unicode characters. |
218 | - if(is_string($result) && $result !== '') { |
|
218 | + if (is_string($result) && $result !== '') { |
|
219 | 219 | return $result; |
220 | 220 | } |
221 | 221 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | { |
227 | 227 | $string = ''; |
228 | 228 | |
229 | - if(is_string($this->value[0])) { |
|
229 | + if (is_string($this->value[0])) { |
|
230 | 230 | $string .= $this->value[0].'::'; |
231 | 231 | } else { |
232 | 232 | $string .= get_class($this->value[0]).'->'; |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | str_replace(' ', '-', $this->type) |
354 | 354 | ); |
355 | 355 | |
356 | - if($this->getOption('prepend-type') === true && !$this->isNull()) |
|
356 | + if ($this->getOption('prepend-type') === true && !$this->isNull()) |
|
357 | 357 | { |
358 | 358 | $typeLabel = '<span style="color:#1c2eb1" class="variable-type">'.$this->type.'</span> '; |
359 | 359 | $converted = $typeLabel.' '.$converted; |