@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public static function json($subject) : string |
110 | 110 | { |
111 | - if(!is_string($subject)) |
|
111 | + if (!is_string($subject)) |
|
112 | 112 | { |
113 | 113 | $subject = json_encode($subject, JSON_PRETTY_PRINT); |
114 | 114 | } |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @param bool $formatSource Whether to format the source with indentation to make it readable. |
126 | 126 | * @return string |
127 | 127 | */ |
128 | - public static function xml(string $xml, bool $formatSource=false) : string |
|
128 | + public static function xml(string $xml, bool $formatSource = false) : string |
|
129 | 129 | { |
130 | - if($formatSource) |
|
130 | + if ($formatSource) |
|
131 | 131 | { |
132 | 132 | $dom = new DOMDocument(); |
133 | 133 | $dom->preserveWhiteSpace = false; |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | * @param bool $formatSource |
149 | 149 | * @return string |
150 | 150 | */ |
151 | - public static function html(string $html, bool $formatSource=false) : string |
|
151 | + public static function html(string $html, bool $formatSource = false) : string |
|
152 | 152 | { |
153 | - if($formatSource) |
|
153 | + if ($formatSource) |
|
154 | 154 | { |
155 | 155 | $dom = new DOMDocument(); |
156 | 156 | $dom->preserveWhiteSpace = false; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | private function initUnits() : void |
50 | 50 | { |
51 | - if(isset(self::$units)) |
|
51 | + if (isset(self::$units)) |
|
52 | 52 | { |
53 | 53 | return; |
54 | 54 | } |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | public function toString() : string |
91 | 91 | { |
92 | 92 | // specifically handle zero |
93 | - if($this->seconds <= 0) |
|
93 | + if ($this->seconds <= 0) |
|
94 | 94 | { |
95 | - return '0 ' . t('seconds'); |
|
95 | + return '0 '.t('seconds'); |
|
96 | 96 | } |
97 | 97 | |
98 | - if($this->seconds < 1) |
|
98 | + if ($this->seconds < 1) |
|
99 | 99 | { |
100 | 100 | return t('less than a second'); |
101 | 101 | } |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | |
105 | 105 | $last = array_pop($tokens); |
106 | 106 | |
107 | - if(empty($tokens)) |
|
107 | + if (empty($tokens)) |
|
108 | 108 | { |
109 | 109 | return $last; |
110 | 110 | } |
111 | 111 | |
112 | - return implode(', ', $tokens) . ' ' . t('and') . ' ' . $last; |
|
112 | + return implode(', ', $tokens).' '.t('and').' '.$last; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -122,18 +122,18 @@ discard block |
||
122 | 122 | $seconds = $this->seconds; |
123 | 123 | $tokens = array(); |
124 | 124 | |
125 | - foreach(self::$units as $def) |
|
125 | + foreach (self::$units as $def) |
|
126 | 126 | { |
127 | 127 | $unitValue = intval($seconds / $def['value']); |
128 | 128 | |
129 | - if($unitValue <= 0) |
|
129 | + if ($unitValue <= 0) |
|
130 | 130 | { |
131 | 131 | continue; |
132 | 132 | } |
133 | 133 | |
134 | - $item = strval($unitValue) . ' '; |
|
134 | + $item = strval($unitValue).' '; |
|
135 | 135 | |
136 | - if(abs($unitValue) > 1) |
|
136 | + if (abs($unitValue) > 1) |
|
137 | 137 | { |
138 | 138 | $item .= $def['plural']; |
139 | 139 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | 'fragment' |
78 | 78 | ); |
79 | 79 | |
80 | - foreach($parts as $part) |
|
80 | + foreach ($parts as $part) |
|
81 | 81 | { |
82 | 82 | $method = 'render_'.$part; |
83 | 83 | $result[] = (string)$this->$method(); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | protected function render_scheme() : string |
90 | 90 | { |
91 | - if(!$this->info->hasScheme()) { |
|
91 | + if (!$this->info->hasScheme()) { |
|
92 | 92 | return ''; |
93 | 93 | } |
94 | 94 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | protected function render_username() : string |
105 | 105 | { |
106 | - if(!$this->info->hasUsername()) { |
|
106 | + if (!$this->info->hasUsername()) { |
|
107 | 107 | return ''; |
108 | 108 | } |
109 | 109 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | protected function render_host() : string |
121 | 121 | { |
122 | - if(!$this->info->hasHost()) { |
|
122 | + if (!$this->info->hasHost()) { |
|
123 | 123 | return ''; |
124 | 124 | } |
125 | 125 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | protected function render_port() : string |
133 | 133 | { |
134 | - if(!$this->info->hasPort()) { |
|
134 | + if (!$this->info->hasPort()) { |
|
135 | 135 | return ''; |
136 | 136 | } |
137 | 137 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | protected function render_path() : string |
146 | 146 | { |
147 | - if(!$this->info->hasPath()) { |
|
147 | + if (!$this->info->hasPath()) { |
|
148 | 148 | return ''; |
149 | 149 | } |
150 | 150 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | $previous = $this->info->isParamExclusionEnabled(); |
171 | 171 | |
172 | - if($previous) |
|
172 | + if ($previous) |
|
173 | 173 | { |
174 | 174 | $this->info->setParamExclusion(false); |
175 | 175 | } |
@@ -185,19 +185,19 @@ discard block |
||
185 | 185 | { |
186 | 186 | $params = $this->resolveParams(); |
187 | 187 | |
188 | - if(empty($params)) { |
|
188 | + if (empty($params)) { |
|
189 | 189 | return ''; |
190 | 190 | } |
191 | 191 | |
192 | 192 | $tokens = array(); |
193 | 193 | $excluded = array(); |
194 | 194 | |
195 | - if($this->info->isParamExclusionEnabled()) |
|
195 | + if ($this->info->isParamExclusionEnabled()) |
|
196 | 196 | { |
197 | 197 | $excluded = $this->info->getExcludedParams(); |
198 | 198 | } |
199 | 199 | |
200 | - foreach($params as $param => $value) |
|
200 | + foreach ($params as $param => $value) |
|
201 | 201 | { |
202 | 202 | // If the parameter is numeric, it will automatically |
203 | 203 | // be an integer, so we need the conversion here. |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | $tag = $this->resolveTag($excluded, $param); |
220 | 220 | |
221 | - if(!empty($tag)) |
|
221 | + if (!empty($tag)) |
|
222 | 222 | { |
223 | 223 | $tokens[] = sprintf($tag, $parts); |
224 | 224 | } |
@@ -232,13 +232,13 @@ discard block |
||
232 | 232 | protected function resolveTag(array $excluded, string $paramName) : string |
233 | 233 | { |
234 | 234 | // regular, non-excluded parameter |
235 | - if(!isset($excluded[$paramName])) |
|
235 | + if (!isset($excluded[$paramName])) |
|
236 | 236 | { |
237 | 237 | return '<span class="link-param">%s</span>'; |
238 | 238 | } |
239 | 239 | |
240 | 240 | // highlight excluded parameters is disabled, ignore this parameter |
241 | - if(!$this->info->isHighlightExcludeEnabled()) |
|
241 | + if (!$this->info->isHighlightExcludeEnabled()) |
|
242 | 242 | { |
243 | 243 | return ''; |
244 | 244 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | protected function render_fragment() : string |
256 | 256 | { |
257 | - if(!$this->info->hasFragment()) { |
|
257 | + if (!$this->info->hasFragment()) { |
|
258 | 258 | return ''; |
259 | 259 | } |
260 | 260 | |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | { |
270 | 270 | $cssFolder = realpath(__DIR__.'/../../css'); |
271 | 271 | |
272 | - if($cssFolder === false) { |
|
272 | + if ($cssFolder === false) { |
|
273 | 273 | throw new BaseException( |
274 | 274 | 'Cannot find package CSS folder.', |
275 | 275 | null, |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | * @param mixed $value |
57 | 57 | * @param array|null $serialized |
58 | 58 | */ |
59 | - public function __construct($value, $serialized=null) |
|
59 | + public function __construct($value, $serialized = null) |
|
60 | 60 | { |
61 | - if(is_array($serialized)) |
|
61 | + if (is_array($serialized)) |
|
62 | 62 | { |
63 | 63 | $this->parseSerialized($serialized); |
64 | 64 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | protected function parseSerialized(array $serialized) : void |
106 | 106 | { |
107 | - if(!isset($serialized['string']) || !isset($serialized['type']) || !isset($serialized['options'])) |
|
107 | + if (!isset($serialized['string']) || !isset($serialized['type']) || !isset($serialized['options'])) |
|
108 | 108 | { |
109 | 109 | throw new BaseException( |
110 | 110 | 'Invalid variable info serialized data.', |
@@ -126,12 +126,12 @@ discard block |
||
126 | 126 | |
127 | 127 | // Gettype will return a string like "Resource(closed)" when |
128 | 128 | // working with a resource that has already been closed. |
129 | - if(strstr($this->type, 'resource')) |
|
129 | + if (strstr($this->type, 'resource')) |
|
130 | 130 | { |
131 | 131 | $this->type = self::TYPE_RESOURCE; |
132 | 132 | } |
133 | 133 | |
134 | - if(is_array($value) && is_callable($value)) { |
|
134 | + if (is_array($value) && is_callable($value)) { |
|
135 | 135 | $this->type = self::TYPE_CALLABLE; |
136 | 136 | } |
137 | 137 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @param bool $enable |
170 | 170 | * @return VariableInfo |
171 | 171 | */ |
172 | - public function enableType(bool $enable=true) : VariableInfo |
|
172 | + public function enableType(bool $enable = true) : VariableInfo |
|
173 | 173 | { |
174 | 174 | return $this->setOption('prepend-type', $enable); |
175 | 175 | } |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | { |
179 | 179 | $converted = $this->string; |
180 | 180 | |
181 | - if($this->getOption('prepend-type') === true && !$this->isNull()) |
|
181 | + if ($this->getOption('prepend-type') === true && !$this->isNull()) |
|
182 | 182 | { |
183 | - if($this->isString()) |
|
183 | + if ($this->isString()) |
|
184 | 184 | { |
185 | 185 | $converted = '"'.$converted.'"'; |
186 | 186 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param int $tabSize The amount of spaces per tab. |
51 | 51 | * @return string |
52 | 52 | */ |
53 | - public static function tabs2spaces(string $string, int $tabSize=4) : string |
|
53 | + public static function tabs2spaces(string $string, int $tabSize = 4) : string |
|
54 | 54 | { |
55 | 55 | return str_replace("\t", str_repeat(' ', $tabSize), $string); |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @param int $tabSize The amount of spaces per tab in the source string. |
63 | 63 | * @return string |
64 | 64 | */ |
65 | - public static function spaces2tabs(string $string, int $tabSize=4) : string |
|
65 | + public static function spaces2tabs(string $string, int $tabSize = 4) : string |
|
66 | 66 | { |
67 | 67 | return str_replace(str_repeat(' ', $tabSize), "\t", $string); |
68 | 68 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $converter = new ConvertHelper_DurationConverter(); |
106 | 106 | |
107 | - if($datefrom instanceof \DateTime) |
|
107 | + if ($datefrom instanceof \DateTime) |
|
108 | 108 | { |
109 | 109 | $converter->setDateFrom($datefrom); |
110 | 110 | } |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | $converter->setDateFrom(self::timestamp2date($datefrom)); |
114 | 114 | } |
115 | 115 | |
116 | - if($dateto instanceof \DateTime) |
|
116 | + if ($dateto instanceof \DateTime) |
|
117 | 117 | { |
118 | 118 | $converter->setDateTo($dateto); |
119 | 119 | } |
120 | - else if($dateto > 0) |
|
120 | + else if ($dateto > 0) |
|
121 | 121 | { |
122 | 122 | $converter->setDateTo(self::timestamp2date($dateto)); |
123 | 123 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @deprecated Use the Highlighter class directly instead. |
148 | 148 | * @see Highlighter::xml() |
149 | 149 | */ |
150 | - public static function highlight_xml(string $xml, bool $formatSource=false) : string |
|
150 | + public static function highlight_xml(string $xml, bool $formatSource = false) : string |
|
151 | 151 | { |
152 | 152 | return Highlighter::xml($xml, $formatSource); |
153 | 153 | } |
@@ -208,16 +208,16 @@ discard block |
||
208 | 208 | return $text; |
209 | 209 | } |
210 | 210 | |
211 | - $text = trim(mb_substr($text, 0, $targetLength)) . $append; |
|
211 | + $text = trim(mb_substr($text, 0, $targetLength)).$append; |
|
212 | 212 | |
213 | 213 | return $text; |
214 | 214 | } |
215 | 215 | |
216 | - public static function var_dump($var, $html=true) : string |
|
216 | + public static function var_dump($var, $html = true) : string |
|
217 | 217 | { |
218 | 218 | $info = parseVariable($var); |
219 | 219 | |
220 | - if($html) { |
|
220 | + if ($html) { |
|
221 | 221 | return $info->toHTML(); |
222 | 222 | } |
223 | 223 | |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | * @param bool $html Whether to style the dump as HTML. |
233 | 233 | * @return string |
234 | 234 | */ |
235 | - public static function print_r($var, bool $return=false, bool $html=true) : string |
|
235 | + public static function print_r($var, bool $return = false, bool $html = true) : string |
|
236 | 236 | { |
237 | 237 | $result = parseVariable($var)->enableType()->toString(); |
238 | 238 | |
239 | - if($html) |
|
239 | + if ($html) |
|
240 | 240 | { |
241 | 241 | $result = |
242 | 242 | '<pre style="background:#fff;color:#333;padding:16px;border:solid 1px #bbb;border-radius:4px">'. |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | '</pre>'; |
245 | 245 | } |
246 | 246 | |
247 | - if(!$return) |
|
247 | + if (!$return) |
|
248 | 248 | { |
249 | 249 | echo $result; |
250 | 250 | } |
@@ -275,17 +275,17 @@ discard block |
||
275 | 275 | */ |
276 | 276 | public static function string2bool($string) : bool |
277 | 277 | { |
278 | - if($string === '' || $string === null || !is_scalar($string)) |
|
278 | + if ($string === '' || $string === null || !is_scalar($string)) |
|
279 | 279 | { |
280 | 280 | return false; |
281 | 281 | } |
282 | 282 | |
283 | - if(is_bool($string)) |
|
283 | + if (is_bool($string)) |
|
284 | 284 | { |
285 | 285 | return $string; |
286 | 286 | } |
287 | 287 | |
288 | - if(array_key_exists($string, self::$booleanStrings)) |
|
288 | + if (array_key_exists($string, self::$booleanStrings)) |
|
289 | 289 | { |
290 | 290 | return self::$booleanStrings[$string]; |
291 | 291 | } |
@@ -340,10 +340,10 @@ discard block |
||
340 | 340 | public static function date2listLabel(\DateTime $date, $includeTime = false, $shortMonth = false) |
341 | 341 | { |
342 | 342 | $today = new \DateTime(); |
343 | - if($date->format('d.m.Y') == $today->format('d.m.Y')) { |
|
343 | + if ($date->format('d.m.Y') == $today->format('d.m.Y')) { |
|
344 | 344 | $label = t('Today'); |
345 | 345 | } else { |
346 | - $label = $date->format('d') . '. ' . self::month2string((int)$date->format('m'), $shortMonth) . ' '; |
|
346 | + $label = $date->format('d').'. '.self::month2string((int)$date->format('m'), $shortMonth).' '; |
|
347 | 347 | if ($date->format('Y') != date('Y')) { |
348 | 348 | $label .= $date->format('Y'); |
349 | 349 | } |
@@ -503,12 +503,12 @@ discard block |
||
503 | 503 | $output = ''; |
504 | 504 | $split = str_split($unicodeChar); |
505 | 505 | |
506 | - foreach($split as $octet) |
|
506 | + foreach ($split as $octet) |
|
507 | 507 | { |
508 | 508 | $ordInt = ord($octet); |
509 | 509 | // Convert from int (base 10) to hex (base 16), for PHP \x syntax |
510 | 510 | $ordHex = base_convert((string)$ordInt, 10, 16); |
511 | - $output .= '\x' . $ordHex; |
|
511 | + $output .= '\x'.$ordHex; |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | return $output; |
@@ -541,19 +541,19 @@ discard block |
||
541 | 541 | |
542 | 542 | protected static function convertScalarForComparison($scalar) |
543 | 543 | { |
544 | - if($scalar === '' || is_null($scalar)) { |
|
544 | + if ($scalar === '' || is_null($scalar)) { |
|
545 | 545 | return null; |
546 | 546 | } |
547 | 547 | |
548 | - if(is_bool($scalar)) { |
|
548 | + if (is_bool($scalar)) { |
|
549 | 549 | return self::bool2string($scalar); |
550 | 550 | } |
551 | 551 | |
552 | - if(is_array($scalar)) { |
|
552 | + if (is_array($scalar)) { |
|
553 | 553 | $scalar = md5(serialize($scalar)); |
554 | 554 | } |
555 | 555 | |
556 | - if($scalar !== null && !is_scalar($scalar)) { |
|
556 | + if ($scalar !== null && !is_scalar($scalar)) { |
|
557 | 557 | throw new ConvertHelper_Exception( |
558 | 558 | 'Not a scalar value in comparison', |
559 | 559 | null, |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | public static function bool2string($boolean, bool $yesno = false) : string |
603 | 603 | { |
604 | 604 | // allow 'yes', 'true', 'no', 'false' string notations as well |
605 | - if(!is_bool($boolean)) { |
|
605 | + if (!is_bool($boolean)) { |
|
606 | 606 | $boolean = self::string2bool($boolean); |
607 | 607 | } |
608 | 608 | |
@@ -643,15 +643,15 @@ discard block |
||
643 | 643 | public static function array2attributeString($array) |
644 | 644 | { |
645 | 645 | $tokens = array(); |
646 | - foreach($array as $attr => $value) { |
|
647 | - if($value == '' || $value == null) { |
|
646 | + foreach ($array as $attr => $value) { |
|
647 | + if ($value == '' || $value == null) { |
|
648 | 648 | continue; |
649 | 649 | } |
650 | 650 | |
651 | 651 | $tokens[] = $attr.'="'.$value.'"'; |
652 | 652 | } |
653 | 653 | |
654 | - if(empty($tokens)) { |
|
654 | + if (empty($tokens)) { |
|
655 | 655 | return ''; |
656 | 656 | } |
657 | 657 | |
@@ -666,10 +666,10 @@ discard block |
||
666 | 666 | * @param string $string |
667 | 667 | * @return string |
668 | 668 | */ |
669 | - public static function string2attributeJS($string, $quoted=true) |
|
669 | + public static function string2attributeJS($string, $quoted = true) |
|
670 | 670 | { |
671 | 671 | $converted = addslashes(htmlspecialchars(strip_tags($string), ENT_QUOTES, 'UTF-8')); |
672 | - if($quoted) { |
|
672 | + if ($quoted) { |
|
673 | 673 | $converted = "'".$converted."'"; |
674 | 674 | } |
675 | 675 | |
@@ -687,11 +687,11 @@ discard block |
||
687 | 687 | */ |
688 | 688 | public static function isBoolean($value) : bool |
689 | 689 | { |
690 | - if(is_bool($value)) { |
|
690 | + if (is_bool($value)) { |
|
691 | 691 | return true; |
692 | 692 | } |
693 | 693 | |
694 | - if(!is_scalar($value)) { |
|
694 | + if (!is_scalar($value)) { |
|
695 | 695 | return false; |
696 | 696 | } |
697 | 697 | |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | public static function array2styleString(array $subject) : string |
708 | 708 | { |
709 | 709 | $tokens = array(); |
710 | - foreach($subject as $name => $value) { |
|
710 | + foreach ($subject as $name => $value) { |
|
711 | 711 | $tokens[] = $name.':'.$value; |
712 | 712 | } |
713 | 713 | |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | * |
766 | 766 | * @see JSHelper::buildRegexStatement() |
767 | 767 | */ |
768 | - public static function regex2js(string $regex, string $statementType=JSHelper::JS_REGEX_OBJECT) |
|
768 | + public static function regex2js(string $regex, string $statementType = JSHelper::JS_REGEX_OBJECT) |
|
769 | 769 | { |
770 | 770 | return JSHelper::buildRegexStatement($regex, $statementType); |
771 | 771 | } |
@@ -782,11 +782,11 @@ discard block |
||
782 | 782 | * @throws ConvertHelper_Exception |
783 | 783 | * @return string |
784 | 784 | */ |
785 | - public static function var2json($variable, int $options=0, int $depth=512) : string |
|
785 | + public static function var2json($variable, int $options = 0, int $depth = 512) : string |
|
786 | 786 | { |
787 | 787 | $result = json_encode($variable, $options, $depth); |
788 | 788 | |
789 | - if($result !== false) { |
|
789 | + if ($result !== false) { |
|
790 | 790 | return $result; |
791 | 791 | } |
792 | 792 | |
@@ -811,10 +811,10 @@ discard block |
||
811 | 811 | public static function stripUTFBom($string) |
812 | 812 | { |
813 | 813 | $boms = FileHelper::getUTFBOMs(); |
814 | - foreach($boms as $bomChars) { |
|
814 | + foreach ($boms as $bomChars) { |
|
815 | 815 | $length = mb_strlen($bomChars); |
816 | 816 | $text = mb_substr($string, 0, $length); |
817 | - if($text==$bomChars) { |
|
817 | + if ($text == $bomChars) { |
|
818 | 818 | return mb_substr($string, $length); |
819 | 819 | } |
820 | 820 | } |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | */ |
832 | 832 | public static function string2utf8($string) |
833 | 833 | { |
834 | - if(!self::isStringASCII($string)) { |
|
834 | + if (!self::isStringASCII($string)) { |
|
835 | 835 | return \ForceUTF8\Encoding::toUTF8($string); |
836 | 836 | } |
837 | 837 | |
@@ -849,11 +849,11 @@ discard block |
||
849 | 849 | */ |
850 | 850 | public static function isStringASCII($string) : bool |
851 | 851 | { |
852 | - if($string === '' || $string === NULL) { |
|
852 | + if ($string === '' || $string === NULL) { |
|
853 | 853 | return true; |
854 | 854 | } |
855 | 855 | |
856 | - if(!is_string($string)) { |
|
856 | + if (!is_string($string)) { |
|
857 | 857 | return false; |
858 | 858 | } |
859 | 859 | |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | * @param array $options |
894 | 894 | * @return float |
895 | 895 | */ |
896 | - public static function matchString($source, $target, $options=array()) |
|
896 | + public static function matchString($source, $target, $options = array()) |
|
897 | 897 | { |
898 | 898 | $defaults = array( |
899 | 899 | 'maxLevenshtein' => 10, |
@@ -903,12 +903,12 @@ discard block |
||
903 | 903 | $options = array_merge($defaults, $options); |
904 | 904 | |
905 | 905 | // avoid doing this via levenshtein |
906 | - if($source == $target) { |
|
906 | + if ($source == $target) { |
|
907 | 907 | return 100; |
908 | 908 | } |
909 | 909 | |
910 | 910 | $diff = levenshtein($source, $target); |
911 | - if($diff > $options['maxLevenshtein']) { |
|
911 | + if ($diff > $options['maxLevenshtein']) { |
|
912 | 912 | return 0; |
913 | 913 | } |
914 | 914 | |
@@ -992,24 +992,24 @@ discard block |
||
992 | 992 | * @see ConvertHelper::INTERVAL_HOURS |
993 | 993 | * @see ConvertHelper::INTERVAL_DAYS |
994 | 994 | */ |
995 | - public static function interval2total(\DateInterval $interval, $unit=self::INTERVAL_SECONDS) : int |
|
995 | + public static function interval2total(\DateInterval $interval, $unit = self::INTERVAL_SECONDS) : int |
|
996 | 996 | { |
997 | 997 | $total = (int)$interval->format('%a'); |
998 | 998 | if ($unit == self::INTERVAL_DAYS) { |
999 | 999 | return $total; |
1000 | 1000 | } |
1001 | 1001 | |
1002 | - $total = ($total * 24) + ((int)$interval->h ); |
|
1002 | + $total = ($total * 24) + ((int)$interval->h); |
|
1003 | 1003 | if ($unit == self::INTERVAL_HOURS) { |
1004 | 1004 | return $total; |
1005 | 1005 | } |
1006 | 1006 | |
1007 | - $total = ($total * 60) + ((int)$interval->i ); |
|
1007 | + $total = ($total * 60) + ((int)$interval->i); |
|
1008 | 1008 | if ($unit == self::INTERVAL_MINUTES) { |
1009 | 1009 | return $total; |
1010 | 1010 | } |
1011 | 1011 | |
1012 | - $total = ($total * 60) + ((int)$interval->s ); |
|
1012 | + $total = ($total * 60) + ((int)$interval->s); |
|
1013 | 1013 | if ($unit == self::INTERVAL_SECONDS) { |
1014 | 1014 | return $total; |
1015 | 1015 | } |
@@ -1038,13 +1038,13 @@ discard block |
||
1038 | 1038 | * @param bool $short |
1039 | 1039 | * @return string|NULL |
1040 | 1040 | */ |
1041 | - public static function date2dayName(\DateTime $date, bool $short=false) |
|
1041 | + public static function date2dayName(\DateTime $date, bool $short = false) |
|
1042 | 1042 | { |
1043 | 1043 | $day = $date->format('l'); |
1044 | 1044 | $invariant = self::getDayNamesInvariant(); |
1045 | 1045 | |
1046 | 1046 | $idx = array_search($day, $invariant); |
1047 | - if($idx !== false) { |
|
1047 | + if ($idx !== false) { |
|
1048 | 1048 | $localized = self::getDayNames($short); |
1049 | 1049 | return $localized[$idx]; |
1050 | 1050 | } |
@@ -1067,10 +1067,10 @@ discard block |
||
1067 | 1067 | * @param bool $short |
1068 | 1068 | * @return array |
1069 | 1069 | */ |
1070 | - public static function getDayNames(bool $short=false) : array |
|
1070 | + public static function getDayNames(bool $short = false) : array |
|
1071 | 1071 | { |
1072 | - if($short) { |
|
1073 | - if(!isset(self::$daysShort)) { |
|
1072 | + if ($short) { |
|
1073 | + if (!isset(self::$daysShort)) { |
|
1074 | 1074 | self::$daysShort = array( |
1075 | 1075 | t('Mon'), |
1076 | 1076 | t('Tue'), |
@@ -1085,7 +1085,7 @@ discard block |
||
1085 | 1085 | return self::$daysShort; |
1086 | 1086 | } |
1087 | 1087 | |
1088 | - if(!isset(self::$days)) { |
|
1088 | + if (!isset(self::$days)) { |
|
1089 | 1089 | self::$days = array( |
1090 | 1090 | t('Monday'), |
1091 | 1091 | t('Tuesday'), |
@@ -1110,17 +1110,17 @@ discard block |
||
1110 | 1110 | */ |
1111 | 1111 | public static function implodeWithAnd(array $list, $sep = ', ', $conjunction = null) |
1112 | 1112 | { |
1113 | - if(empty($list)) { |
|
1113 | + if (empty($list)) { |
|
1114 | 1114 | return ''; |
1115 | 1115 | } |
1116 | 1116 | |
1117 | - if(empty($conjunction)) { |
|
1117 | + if (empty($conjunction)) { |
|
1118 | 1118 | $conjunction = t('and'); |
1119 | 1119 | } |
1120 | 1120 | |
1121 | 1121 | $last = array_pop($list); |
1122 | - if($list) { |
|
1123 | - return implode($sep, $list) . $conjunction . ' ' . $last; |
|
1122 | + if ($list) { |
|
1123 | + return implode($sep, $list).$conjunction.' '.$last; |
|
1124 | 1124 | } |
1125 | 1125 | |
1126 | 1126 | return $last; |
@@ -1139,7 +1139,7 @@ discard block |
||
1139 | 1139 | public static function string2array(string $string) : array |
1140 | 1140 | { |
1141 | 1141 | $result = preg_split('//u', $string, null, PREG_SPLIT_NO_EMPTY); |
1142 | - if($result !== false) { |
|
1142 | + if ($result !== false) { |
|
1143 | 1143 | return $result; |
1144 | 1144 | } |
1145 | 1145 | |
@@ -1154,12 +1154,12 @@ discard block |
||
1154 | 1154 | */ |
1155 | 1155 | public static function isStringHTML(string $string) : bool |
1156 | 1156 | { |
1157 | - if(preg_match('%<[a-z/][\s\S]*>%siU', $string)) { |
|
1157 | + if (preg_match('%<[a-z/][\s\S]*>%siU', $string)) { |
|
1158 | 1158 | return true; |
1159 | 1159 | } |
1160 | 1160 | |
1161 | 1161 | $decoded = html_entity_decode($string); |
1162 | - if($decoded !== $string) { |
|
1162 | + if ($decoded !== $string) { |
|
1163 | 1163 | return true; |
1164 | 1164 | } |
1165 | 1165 | |
@@ -1268,14 +1268,14 @@ discard block |
||
1268 | 1268 | * @param bool $caseInsensitive |
1269 | 1269 | * @return ConvertHelper_StringMatch[] |
1270 | 1270 | */ |
1271 | - public static function findString(string $needle, string $haystack, bool $caseInsensitive=false) |
|
1271 | + public static function findString(string $needle, string $haystack, bool $caseInsensitive = false) |
|
1272 | 1272 | { |
1273 | - if($needle === '') { |
|
1273 | + if ($needle === '') { |
|
1274 | 1274 | return array(); |
1275 | 1275 | } |
1276 | 1276 | |
1277 | 1277 | $function = 'mb_strpos'; |
1278 | - if($caseInsensitive) { |
|
1278 | + if ($caseInsensitive) { |
|
1279 | 1279 | $function = 'mb_stripos'; |
1280 | 1280 | } |
1281 | 1281 | |
@@ -1283,7 +1283,7 @@ discard block |
||
1283 | 1283 | $positions = array(); |
1284 | 1284 | $length = mb_strlen($needle); |
1285 | 1285 | |
1286 | - while( ($pos = $function($haystack, $needle, $pos)) !== false) |
|
1286 | + while (($pos = $function($haystack, $needle, $pos)) !== false) |
|
1287 | 1287 | { |
1288 | 1288 | $match = mb_substr($haystack, $pos, $length); |
1289 | 1289 | $positions[] = new ConvertHelper_StringMatch($pos, $match); |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | */ |
1304 | 1304 | public static function explodeTrim(string $delimiter, string $string) : array |
1305 | 1305 | { |
1306 | - if(empty($string) || empty($delimiter)) { |
|
1306 | + if (empty($string) || empty($delimiter)) { |
|
1307 | 1307 | return array(); |
1308 | 1308 | } |
1309 | 1309 | |
@@ -1311,8 +1311,8 @@ discard block |
||
1311 | 1311 | $tokens = array_map('trim', $tokens); |
1312 | 1312 | |
1313 | 1313 | $keep = array(); |
1314 | - foreach($tokens as $token) { |
|
1315 | - if($token !== '') { |
|
1314 | + foreach ($tokens as $token) { |
|
1315 | + if ($token !== '') { |
|
1316 | 1316 | $keep[] = $token; |
1317 | 1317 | } |
1318 | 1318 | } |
@@ -1330,11 +1330,11 @@ discard block |
||
1330 | 1330 | */ |
1331 | 1331 | public static function detectEOLCharacter(string $subjectString) : ?ConvertHelper_EOL |
1332 | 1332 | { |
1333 | - if(empty($subjectString)) { |
|
1333 | + if (empty($subjectString)) { |
|
1334 | 1334 | return null; |
1335 | 1335 | } |
1336 | 1336 | |
1337 | - if(!isset(self::$eolChars)) |
|
1337 | + if (!isset(self::$eolChars)) |
|
1338 | 1338 | { |
1339 | 1339 | $cr = chr((int)hexdec('0d')); |
1340 | 1340 | $lf = chr((int)hexdec('0a')); |
@@ -1365,18 +1365,18 @@ discard block |
||
1365 | 1365 | |
1366 | 1366 | $max = 0; |
1367 | 1367 | $results = array(); |
1368 | - foreach(self::$eolChars as $def) |
|
1368 | + foreach (self::$eolChars as $def) |
|
1369 | 1369 | { |
1370 | 1370 | $amount = substr_count($subjectString, $def['char']); |
1371 | 1371 | |
1372 | - if($amount > $max) |
|
1372 | + if ($amount > $max) |
|
1373 | 1373 | { |
1374 | 1374 | $max = $amount; |
1375 | 1375 | $results[] = $def; |
1376 | 1376 | } |
1377 | 1377 | } |
1378 | 1378 | |
1379 | - if(empty($results)) { |
|
1379 | + if (empty($results)) { |
|
1380 | 1380 | return null; |
1381 | 1381 | } |
1382 | 1382 | |
@@ -1396,9 +1396,9 @@ discard block |
||
1396 | 1396 | */ |
1397 | 1397 | public static function arrayRemoveKeys(array &$array, array $keys) : void |
1398 | 1398 | { |
1399 | - foreach($keys as $key) |
|
1399 | + foreach ($keys as $key) |
|
1400 | 1400 | { |
1401 | - if(array_key_exists($key, $array)) { |
|
1401 | + if (array_key_exists($key, $array)) { |
|
1402 | 1402 | unset($array[$key]); |
1403 | 1403 | } |
1404 | 1404 | } |
@@ -1413,17 +1413,17 @@ discard block |
||
1413 | 1413 | */ |
1414 | 1414 | public static function isInteger($value) : bool |
1415 | 1415 | { |
1416 | - if(is_int($value)) { |
|
1416 | + if (is_int($value)) { |
|
1417 | 1417 | return true; |
1418 | 1418 | } |
1419 | 1419 | |
1420 | 1420 | // booleans get converted to numbers, so they would |
1421 | 1421 | // actually match the regex. |
1422 | - if(is_bool($value)) { |
|
1422 | + if (is_bool($value)) { |
|
1423 | 1423 | return false; |
1424 | 1424 | } |
1425 | 1425 | |
1426 | - if(is_string($value) && $value !== '') { |
|
1426 | + if (is_string($value) && $value !== '') { |
|
1427 | 1427 | return preg_match('/\A-?\d+\z/', $value) === 1; |
1428 | 1428 | } |
1429 | 1429 |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | public function isHeadersPosition($position) |
172 | 172 | { |
173 | - if($this->headersPosition === $position) { |
|
173 | + if ($this->headersPosition === $position) { |
|
174 | 174 | return true; |
175 | 175 | } |
176 | 176 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | self::HEADERS_TOP |
198 | 198 | ); |
199 | 199 | |
200 | - if(!in_array($position, $validPositions)) { |
|
200 | + if (!in_array($position, $validPositions)) { |
|
201 | 201 | throw new CSVHelper_Exception( |
202 | 202 | 'Invalid headers position', |
203 | 203 | sprintf( |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function getRow($index) |
255 | 255 | { |
256 | - if(isset($this->data[$index])) { |
|
256 | + if (isset($this->data[$index])) { |
|
257 | 257 | return $this->data[$index]; |
258 | 258 | } |
259 | 259 | |
@@ -320,9 +320,9 @@ discard block |
||
320 | 320 | public function getColumn($index) |
321 | 321 | { |
322 | 322 | $data = array(); |
323 | - for($i=0; $i < $this->rowCount; $i++) { |
|
323 | + for ($i = 0; $i < $this->rowCount; $i++) { |
|
324 | 324 | $value = ''; |
325 | - if(isset($this->data[$i][$index])) { |
|
325 | + if (isset($this->data[$i][$index])) { |
|
326 | 326 | $value = $this->data[$i][$index]; |
327 | 327 | } |
328 | 328 | |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | */ |
340 | 340 | public function columnExists($index) |
341 | 341 | { |
342 | - if($index < $this->columnCount) { |
|
342 | + if ($index < $this->columnCount) { |
|
343 | 343 | return true; |
344 | 344 | } |
345 | 345 | |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | { |
351 | 351 | $this->reset(); |
352 | 352 | |
353 | - if(empty(trim($this->csv))) { |
|
353 | + if (empty(trim($this->csv))) { |
|
354 | 354 | $this->addError('Tried to parse an empty CSV string.'); |
355 | 355 | return; |
356 | 356 | } |
@@ -362,14 +362,14 @@ discard block |
||
362 | 362 | |
363 | 363 | $parser = self::createParser(); |
364 | 364 | |
365 | - if(!$parser->parse($this->csv)) { |
|
365 | + if (!$parser->parse($this->csv)) { |
|
366 | 366 | $this->addError('The CSV string could not be parsed.'); |
367 | 367 | return; |
368 | 368 | } |
369 | 369 | |
370 | 370 | $result = $parser->data; |
371 | 371 | |
372 | - switch($this->headersPosition) |
|
372 | + switch ($this->headersPosition) |
|
373 | 373 | { |
374 | 374 | case self::HEADERS_TOP: |
375 | 375 | $this->headers = array_shift($result); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | case self::HEADERS_LEFT: |
379 | 379 | $keep = array(); |
380 | 380 | $total = count($result); |
381 | - for($i=0; $i < $total; $i++) { |
|
381 | + for ($i = 0; $i < $total; $i++) { |
|
382 | 382 | $row = $result[$i]; |
383 | 383 | $this->headers[] = array_shift($row); |
384 | 384 | $keep[] = $row; |
@@ -391,9 +391,9 @@ discard block |
||
391 | 391 | $this->data = $result; |
392 | 392 | $this->rowCount = count($this->data); |
393 | 393 | |
394 | - for($i=0; $i < $this->rowCount; $i++) { |
|
394 | + for ($i = 0; $i < $this->rowCount; $i++) { |
|
395 | 395 | $amount = count($this->data[$i]); |
396 | - if($amount > $this->columnCount) { |
|
396 | + if ($amount > $this->columnCount) { |
|
397 | 397 | $this->columnCount = $amount; |
398 | 398 | } |
399 | 399 | } |
@@ -437,8 +437,8 @@ discard block |
||
437 | 437 | ',,' => ',' |
438 | 438 | ); |
439 | 439 | |
440 | - foreach($search as $char => $separator) { |
|
441 | - if(strstr($this->csv, $char)) { |
|
440 | + foreach ($search as $char => $separator) { |
|
441 | + if (strstr($this->csv, $char)) { |
|
442 | 442 | return $separator; |
443 | 443 | } |
444 | 444 | } |
@@ -452,11 +452,11 @@ discard block |
||
452 | 452 | * @param string $delimiter |
453 | 453 | * @return Csv |
454 | 454 | */ |
455 | - public static function createParser(string $delimiter=self::DELIMITER_AUTO) : Csv |
|
455 | + public static function createParser(string $delimiter = self::DELIMITER_AUTO) : Csv |
|
456 | 456 | { |
457 | 457 | $csv = new Csv(); |
458 | 458 | |
459 | - if($delimiter !== self::DELIMITER_AUTO) { |
|
459 | + if ($delimiter !== self::DELIMITER_AUTO) { |
|
460 | 460 | $csv->delimiter = $delimiter; |
461 | 461 | } |
462 | 462 | |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | $parser = self::createParser(); |
483 | 483 | $result = $parser->parse($path); |
484 | 484 | |
485 | - if($result === true) { |
|
485 | + if ($result === true) { |
|
486 | 486 | return $parser->data; |
487 | 487 | } |
488 | 488 | |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | $parser = self::createParser(); |
513 | 513 | $result = $parser->parse($string); |
514 | 514 | |
515 | - if($result === true) { |
|
515 | + if ($result === true) { |
|
516 | 516 | return $parser->data; |
517 | 517 | } |
518 | 518 |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | * @param bool $forceNew |
19 | 19 | * @return NumberInfo |
20 | 20 | */ |
21 | -function parseNumber($value, bool $forceNew=false) |
|
21 | +function parseNumber($value, bool $forceNew = false) |
|
22 | 22 | { |
23 | - if($value instanceof NumberInfo && $forceNew !== true) { |
|
23 | + if ($value instanceof NumberInfo && $forceNew !== true) { |
|
24 | 24 | return $value; |
25 | 25 | } |
26 | 26 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $args = func_get_args(); |
102 | 102 | |
103 | 103 | // is the localization package installed? |
104 | - if(function_exists('\AppLocalize\t')) |
|
104 | + if (function_exists('\AppLocalize\t')) |
|
105 | 105 | { |
106 | 106 | return call_user_func_array('\AppLocalize\t', $args); |
107 | 107 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function requireCURL() : void |
121 | 121 | { |
122 | - if(function_exists('curl_init')) { |
|
122 | + if (function_exists('curl_init')) { |
|
123 | 123 | return; |
124 | 124 | } |
125 | 125 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * @param bool $initial The initial boolean value to use. |
137 | 137 | * @return Value_Bool |
138 | 138 | */ |
139 | -function valBool(bool $initial=false) : Value_Bool |
|
139 | +function valBool(bool $initial = false) : Value_Bool |
|
140 | 140 | { |
141 | 141 | return new Value_Bool($initial); |
142 | 142 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @param bool $initial |
150 | 150 | * @return Value_Bool_True |
151 | 151 | */ |
152 | -function valBoolTrue(bool $initial=false) : Value_Bool_True |
|
152 | +function valBoolTrue(bool $initial = false) : Value_Bool_True |
|
153 | 153 | { |
154 | 154 | return new Value_Bool_True($initial); |
155 | 155 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @param bool $initial |
163 | 163 | * @return Value_Bool_False |
164 | 164 | */ |
165 | -function valBoolFalse(bool $initial=true) : Value_Bool_False |
|
165 | +function valBoolFalse(bool $initial = true) : Value_Bool_False |
|
166 | 166 | { |
167 | 167 | return new Value_Bool_False($initial); |
168 | 168 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | function init() |
186 | 186 | { |
187 | - if(!class_exists('\AppLocalize\Localization')) { |
|
187 | + if (!class_exists('\AppLocalize\Localization')) { |
|
188 | 188 | return; |
189 | 189 | } |
190 | 190 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $autoload = $root.'/vendor/autoload.php'; |
16 | 16 | |
17 | 17 | // we need the autoloader to be present |
18 | - if($autoload === false) |
|
18 | + if ($autoload === false) |
|
19 | 19 | { |
20 | 20 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
21 | 21 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param string[] $paths |
33 | 33 | * @throws FileHelper_Exception |
34 | 34 | */ |
35 | - public function __construct(array $paths=array()) |
|
35 | + public function __construct(array $paths = array()) |
|
36 | 36 | { |
37 | 37 | $this->addPaths($paths); |
38 | 38 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function addPaths(array $paths) : FileHelper_PathsReducer |
48 | 48 | { |
49 | - foreach($paths as $path) { |
|
49 | + foreach ($paths as $path) { |
|
50 | 50 | $this->addPath($path); |
51 | 51 | } |
52 | 52 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | { |
65 | 65 | $path = FileHelper::normalizePath(FileHelper::requireFileExists($path)); |
66 | 66 | |
67 | - if(!in_array($path, $this->paths)) { |
|
67 | + if (!in_array($path, $this->paths)) { |
|
68 | 68 | $this->paths[] = $path; |
69 | 69 | } |
70 | 70 | |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | { |
82 | 82 | $split = $this->splitPaths(); |
83 | 83 | |
84 | - if(empty($split)) { |
|
84 | + if (empty($split)) { |
|
85 | 85 | return array(); |
86 | 86 | } |
87 | 87 | |
88 | - while($this->shiftPart($split) === true) {} |
|
88 | + while ($this->shiftPart($split) === true) {} |
|
89 | 89 | |
90 | 90 | return $this->joinPaths($split); |
91 | 91 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $result = array(); |
100 | 100 | |
101 | 101 | foreach ($split as $entry) { |
102 | - if(!empty($entry)) { |
|
102 | + if (!empty($entry)) { |
|
103 | 103 | $result[] = implode('/', $entry); |
104 | 104 | } |
105 | 105 | } |
@@ -116,22 +116,22 @@ discard block |
||
116 | 116 | $current = null; |
117 | 117 | $result = array(); |
118 | 118 | |
119 | - foreach($split as $entry) |
|
119 | + foreach ($split as $entry) |
|
120 | 120 | { |
121 | - if(empty($entry)) { |
|
121 | + if (empty($entry)) { |
|
122 | 122 | return false; |
123 | 123 | } |
124 | 124 | |
125 | 125 | $part = array_shift($entry); |
126 | - if(empty($entry)) { |
|
126 | + if (empty($entry)) { |
|
127 | 127 | return false; |
128 | 128 | } |
129 | 129 | |
130 | - if($current === null) { |
|
130 | + if ($current === null) { |
|
131 | 131 | $current = $part; |
132 | 132 | } |
133 | 133 | |
134 | - if($part !== $current) { |
|
134 | + if ($part !== $current) { |
|
135 | 135 | return false; |
136 | 136 | } |
137 | 137 | |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | { |
148 | 148 | $split = array(); |
149 | 149 | |
150 | - foreach($this->paths as $path) { |
|
150 | + foreach ($this->paths as $path) { |
|
151 | 151 | $entry = ConvertHelper::explodeTrim('/', $path); |
152 | - if(!empty($entry)) { |
|
152 | + if (!empty($entry)) { |
|
153 | 153 | $split[] = $entry; |
154 | 154 | } |
155 | 155 | } |