Code Duplication    Length = 16-16 lines in 2 locations

src/ViewHelpers/DebugViewHelper.php 2 locations

@@ 117-132 (lines=16) @@
114
                $string = sprintf('%s %s', $typeLabel, var_export($variable, true)) . PHP_EOL;
115
            } elseif ($variable === null) {
116
                $string = 'null' . PHP_EOL;
117
            } else {
118
                $string = sprintf('%s: ', $typeLabel);
119
                if ($level > $levels) {
120
                    $string .= '*Recursion limited*';
121
                } else {
122
                    $string .= PHP_EOL;
123
                    foreach (static::getValuesOfNonScalarVariable($variable) as $property => $value) {
124
                        $string .= sprintf(
125
                            '%s"%s": %s',
126
                            str_repeat('  ', $level),
127
                            $property,
128
                            static::dumpVariable($value, $html, $level + 1, $levels)
129
                        );
130
                    }
131
                }
132
            }
133
        } else {
134
            if (is_scalar($variable) || $variable === null) {
135
                $string = sprintf(
@@ 145-160 (lines=16) @@
142
                        false
143
                    )
144
                );
145
            } else {
146
                $string = sprintf('<code>%s</code>', $typeLabel);
147
                if ($level > $levels) {
148
                    $string .= '<i>Recursion limited</i>';
149
                } else {
150
                    $string .= '<ul>';
151
                    foreach (static::getValuesOfNonScalarVariable($variable) as $property => $value) {
152
                        $string .= sprintf(
153
                            '<li>%s: %s</li>',
154
                            $property,
155
                            static::dumpVariable($value, $html, $level + 1, $levels)
156
                        );
157
                    }
158
                    $string .= '</ul>';
159
                }
160
            }
161
        }
162
163
        return $string;