@@ -69,7 +69,7 @@ public function shortenedRecursiveExport(array &$data, ?RecursionContext $proces
69
69
$ overallCount = count ($ data , COUNT_RECURSIVE );
70
70
$ counter = 0 ;
71
71
72
- $ export = $ this ->shortenedCountedRecursiveExport ($ data , $ processed , $ overallCount , $ counter );
72
+ $ export = $ this ->shortenedCountedRecursiveExport ($ data , $ processed , $ counter );
73
73
74
74
if ($ overallCount > $ this ->shortenArraysLongerThan ) {
75
75
$ export .= sprintf (' ...%d more elements ' , $ overallCount - $ this ->shortenArraysLongerThan );
@@ -189,7 +189,7 @@ public function toArray(mixed $value): array
189
189
return $ array ;
190
190
}
191
191
192
- private function shortenedCountedRecursiveExport (array &$ data , RecursionContext $ processed , int $ overallCount , int &$ counter ): string
192
+ private function shortenedCountedRecursiveExport (array &$ data , RecursionContext $ processed , int &$ counter ): string
193
193
{
194
194
$ result = [];
195
195
@@ -199,15 +199,15 @@ private function shortenedCountedRecursiveExport(array &$data, RecursionContext
199
199
$ processed ->add ($ data );
200
200
201
201
foreach ($ array as $ key => $ value ) {
202
- if ($ overallCount > $ this -> shortenArraysLongerThan && $ counter > $ this ->shortenArraysLongerThan ) {
202
+ if ($ counter > $ this ->shortenArraysLongerThan ) {
203
203
break ;
204
204
}
205
205
206
206
if (is_array ($ value )) {
207
207
if ($ processed ->contains ($ data [$ key ]) !== false ) {
208
208
$ result [] = '*RECURSION* ' ;
209
209
} else {
210
- $ result [] = '[ ' . $ this ->shortenedCountedRecursiveExport ($ data [$ key ], $ processed , $ overallCount , $ counter ) . '] ' ;
210
+ $ result [] = '[ ' . $ this ->shortenedCountedRecursiveExport ($ data [$ key ], $ processed , $ counter ) . '] ' ;
211
211
}
212
212
} else {
213
213
$ result [] = $ this ->shortenedExport ($ value );
0 commit comments