We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64e9205 commit 97f2c0cCopy full SHA for 97f2c0c
1 file changed
src/Map.php
@@ -4498,13 +4498,13 @@ public function slice( int $offset, ?int $length = null ) : self
4498
public function sliding( int $size = 2, int $step = 1 ) : self
4499
{
4500
$result = [];
4501
- $chunks = floor( ( $this->count() - $size ) / $step ) + 1;
+ $chunks = floor( ( $this->count() - $size ) / $step ) + 1;
4502
4503
for( $i = 0; $i < $chunks; $i++ ) {
4504
$result[] = array_slice( $this->list(), $i * $step, $size, true );
4505
}
4506
4507
- return new static( $result );
+ return new static( $result );
4508
4509
4510
0 commit comments