Skip to content

Commit

Permalink
better method name
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and sebastianbergmann committed Jun 18, 2024
1 parent c28aa4b commit f5ba9b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function shortenedRecursiveExport(array &$data, ?RecursionContext $proces
$overallCount = count($data, COUNT_RECURSIVE);
$counter = 0;

$export = $this->_shortenedRecursiveExport($data, $processed, $overallCount, $counter);
$export = $this->shortenedCountedRecursiveExport($data, $processed, $overallCount, $counter);

if ($overallCount > $this->shortenArraysLongerThan) {
$export .= sprintf(' ...%d more elements', $overallCount - $this->shortenArraysLongerThan);
Expand Down Expand Up @@ -189,7 +189,7 @@ public function toArray(mixed $value): array
return $array;
}

private function _shortenedRecursiveExport(array &$data, RecursionContext $processed, int $overallCount, int &$counter): string
private function shortenedCountedRecursiveExport(array &$data, RecursionContext $processed, int $overallCount, int &$counter): string
{
$result = [];

Expand All @@ -207,7 +207,7 @@ private function _shortenedRecursiveExport(array &$data, RecursionContext $proce
if ($processed->contains($data[$key]) !== false) {
$result[] = '*RECURSION*';
} else {
$result[] = '[' . $this->_shortenedRecursiveExport($data[$key], $processed, $overallCount, $counter) . ']';
$result[] = '[' . $this->shortenedCountedRecursiveExport($data[$key], $processed, $overallCount, $counter) . ']';
}
} else {
$result[] = $this->shortenedExport($value);
Expand Down

0 comments on commit f5ba9b0

Please sign in to comment.