@@ 64-74 (lines=11) @@ | ||
61 | /** |
|
62 | * {@inheritdoc} |
|
63 | */ |
|
64 | public function chunk(int $size): CollectionInterface |
|
65 | { |
|
66 | $chunks = array_chunk($this->values, $size); |
|
67 | $subs = []; |
|
68 | ||
69 | foreach ($chunks as $chunk) { |
|
70 | $subs[] = new self($chunk); |
|
71 | } |
|
72 | ||
73 | return new self($subs); |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * {@inheritdoc} |
@@ 74-87 (lines=14) @@ | ||
71 | /** |
|
72 | * {@inheritdoc} |
|
73 | */ |
|
74 | public function chunk(int $size): CollectionInterface |
|
75 | { |
|
76 | $chunks = parent::chunk($size); |
|
77 | $subs = []; |
|
78 | ||
79 | foreach ($chunks as $chunk) { |
|
80 | $subs[] = new self( |
|
81 | $this->type, |
|
82 | $chunk->toPrimitive() |
|
83 | ); |
|
84 | } |
|
85 | ||
86 | return new parent($subs); |
|
87 | } |
|
88 | ||
89 | /** |
|
90 | * {@inheritdoc} |