Code Duplication    Length = 12-12 lines in 2 locations

src/Prophecy/Util/ExportUtil.php 2 locations

@@ 165-176 (lines=12) @@
162
            $key    = $processed->add($value);
163
            $values = '';
164
165
            if (count($array) > 0) {
166
                foreach ($array as $k => $v) {
167
                    $values .= sprintf(
168
                        '%s    %s => %s' . "\n",
169
                        $whitespace,
170
                        self::recursiveExport($k, $indentation),
171
                        self::recursiveExport($value[$k], $indentation + 1, $processed)
172
                    );
173
                }
174
175
                $values = "\n" . $values . $whitespace;
176
            }
177
178
            return sprintf('Array &%s (%s)', $key, $values);
179
        }
@@ 192-203 (lines=12) @@
189
            $values = '';
190
            $array  = self::toArray($value);
191
192
            if (count($array) > 0) {
193
                foreach ($array as $k => $v) {
194
                    $values .= sprintf(
195
                        '%s    %s => %s' . "\n",
196
                        $whitespace,
197
                        self::recursiveExport($k, $indentation),
198
                        self::recursiveExport($v, $indentation + 1, $processed)
199
                    );
200
                }
201
202
                $values = "\n" . $values . $whitespace;
203
            }
204
205
            return sprintf('%s:%s Object (%s)', $class, $hash, $values);
206
        }