File tree 2 files changed +15
-10
lines changed
2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 5
5
- 7.1
6
6
- 7.2
7
7
8
+ cache :
9
+ directories :
10
+ - $HOME/.composer/cache
11
+
12
+ services :
13
+ - mysql
14
+
8
15
install :
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
11
18
12
19
script :
13
20
- 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)
31
31
return parent ::convertToString ($ data );
32
32
}
33
33
34
- protected function normalize ($ data )
34
+ protected function normalize ($ data, $ depth = 0 )
35
35
{
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 ();
42
40
}
43
41
44
- return parent ::normalize ($ data );
42
+ return parent ::normalize ($ data, $ depth );
45
43
}
46
44
}
You can’t perform that action at this time.
0 commit comments