@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | public static function filter($value, int $minCount = 1, int $maxCount = PHP_INT_MAX) : array |
| 26 | 26 | { |
| 27 | 27 | if (!is_array($value)) { |
| 28 | - throw new FilterException("Value '" . trim(var_export($value, true), "'") . "' is not an array"); |
|
| 28 | + throw new FilterException("Value '".trim(var_export($value, true), "'")."' is not an array"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $count = count($value); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | if (!in_array($value, $haystack, $strict)) { |
| 57 | 57 | throw new FilterException( |
| 58 | - "Value '" . trim(var_export($value, true), "'") . "' is not in array " . var_export($haystack, true) |
|
| 58 | + "Value '".trim(var_export($value, true), "'")."' is not in array ".var_export($haystack, true) |
|
| 59 | 59 | ); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | array_walk_recursive( |
| 81 | 81 | $value, |
| 82 | - function ($item) use (&$result) { |
|
| 82 | + function($item) use (&$result) { |
|
| 83 | 83 | $result[] = $item; |
| 84 | 84 | } |
| 85 | 85 | ); |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | $value = $element->getElementsByTagName('value'); |
| 33 | 33 | $id = $element->getElementsByTagName('id'); |
| 34 | 34 | $type = $element->getElementsByTagName('type'); |
| 35 | - $results[] = '{ "value": "' . addslashes($value->item(0)->nodeValue) |
|
| 36 | - . '", "id": "' . addslashes($id->item(0)->nodeValue) |
|
| 37 | - . '", "type": "' . addslashes($type->item(0)->nodeValue) . '" }'; |
|
| 35 | + $results[] = '{ "value": "'.addslashes($value->item(0)->nodeValue) |
|
| 36 | + . '", "id": "'.addslashes($id->item(0)->nodeValue) |
|
| 37 | + . '", "type": "'.addslashes($type->item(0)->nodeValue).'" }'; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -echo '[' . implode(', ', $results) . ']'; |
|
| 40 | +echo '['.implode(', ', $results).']'; |
|