Skip to content

Commit

Permalink
Merge pull request #298 from sebastianbergmann/master
Browse files Browse the repository at this point in the history
Closes #296
  • Loading branch information
stof authored Nov 21, 2016
2 parents 5c324f4 + 49212ba commit 1f76894
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
"sebastian/comparator": "^1.1",
"doctrine/instantiator": "^1.0.2",
"sebastian/recursion-context": "^1.0"
"sebastian/recursion-context": "^1.0|^2.0"
},

"require-dev": {
"phpspec/phpspec": "^2.0",
"phpunit/phpunit": "^4.8 || ^5"
"phpunit/phpunit": "^4.8 || ^5.6.5"
},

"autoload": {
Expand Down
5 changes: 3 additions & 2 deletions src/Prophecy/Util/ExportUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ protected static function recursiveExport(&$value, $indentation, $processed = nu
return 'Array &' . $key;
}

$array = $value;
$key = $processed->add($value);
$values = '';

if (count($value) > 0) {
foreach ($value as $k => $v) {
if (count($array) > 0) {
foreach ($array as $k => $v) {
$values .= sprintf(
'%s %s => %s' . "\n",
$whitespace,
Expand Down

0 comments on commit 1f76894

Please sign in to comment.