@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public static function dump($dataType, int $indent):string |
| 42 | 42 | { |
| 43 | - if(is_null($dataType)) { |
|
| 43 | + if (is_null($dataType)) { |
|
| 44 | 44 | return ''; |
| 45 | - } elseif(is_resource($dataType)) { |
|
| 45 | + } elseif (is_resource($dataType)) { |
|
| 46 | 46 | return get_resource_type($dataType); |
| 47 | 47 | } elseif (is_scalar($dataType)) { |
| 48 | 48 | return self::dumpScalar($dataType, $indent); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | foreach ($array as $key => $item) { |
| 127 | 127 | $lineStart = current($refKeys) === $key ? "- " : "- $key: "; |
| 128 | 128 | if (is_scalar($item)) { |
| 129 | - self::add($lineStart.self::dump($item,0), $indent); |
|
| 129 | + self::add($lineStart.self::dump($item, 0), $indent); |
|
| 130 | 130 | } else { |
| 131 | 131 | self::add(rtrim($lineStart), $indent); |
| 132 | 132 | self::dump($item, $indent + self::INDENT); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if (is_array($subject) || $subject instanceof \ArrayIterator) { |
| 184 | 184 | $max = count($subject); |
| 185 | 185 | $objectAsArray = is_array($subject) ? $subject : $subject->getArrayCopy(); |
| 186 | - if(array_keys($objectAsArray) !== range(0, $max-1)) { |
|
| 186 | + if (array_keys($objectAsArray) !== range(0, $max - 1)) { |
|
| 187 | 187 | $pairs = $objectAsArray; |
| 188 | 188 | } else { |
| 189 | 189 | $valuesList = []; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | self::$options = is_int($options) ? $options : self::OPTIONS; |
| 48 | 48 | if (is_scalar($dataType)) { |
| 49 | 49 | // TODO: what to woth comments ??? |
| 50 | - return "--- ".DumperHandlers::dumpScalar($dataType, 0). self::LINEFEED ; |
|
| 50 | + return "--- ".DumperHandlers::dumpScalar($dataType, 0).self::LINEFEED; |
|
| 51 | 51 | } |
| 52 | 52 | return DumperHandlers::dump($dataType, $options); |
| 53 | 53 | } |