File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 55 - 7.1
66 - 7.2
77
8+ cache :
9+ directories :
10+ - $HOME/.composer/cache
11+
12+ services :
13+ - mysql
14+
815install :
9- - composer update
10- - composer require php-coveralls/php-coveralls --dev
16+ - COMPOSER_MEMORY_LIMIT=-1 travis_retry composer update --no-interaction --prefer-dist
17+ - COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require --no-interaction --prefer-dist --dev php-coveralls/php-coveralls
1118
1219script :
1320 - vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml
Original file line number Diff line number Diff line change @@ -31,16 +31,14 @@ protected function convertToString($data)
3131 return parent ::convertToString ($ data );
3232 }
3333
34- protected function normalize ($ data )
34+ protected function normalize ($ data, $ depth = 0 )
3535 {
36- if (is_array ($ data ) || ($ data instanceof Traversable)) {
37- $ normalized = [];
38- foreach ($ data as $ key => $ value ) {
39- $ normalized [$ key ] = $ this ->normalize ($ value );
40- }
41- return $ normalized ;
36+ if (is_array ($ data ) || $ data instanceof Traversable) {
37+ return collect ($ data )->map (function ($ item ) {
38+ return $ this ->normalize ($ item );
39+ })->toArray ();
4240 }
4341
44- return parent ::normalize ($ data );
42+ return parent ::normalize ($ data, $ depth );
4543 }
4644}
You can’t perform that action at this time.
0 commit comments