We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 113-118 (lines=6) @@ | ||
110 | $startOffset = max($sliceStart - 1, $afterOffset, -1) + 1; |
|
111 | $endOffset = min($sliceEnd, $beforeOffset, $arrayLength); |
|
112 | ||
113 | if (is_numeric($first)) { |
|
114 | if ($first < 0) { |
|
115 | throw new \InvalidArgumentException('Argument "first" must be a non-negative integer'); |
|
116 | } |
|
117 | $endOffset = min($endOffset, $startOffset + $first); |
|
118 | } |
|
119 | ||
120 | if (is_numeric($last)) { |
|
121 | if ($last < 0) { |
|
@@ 120-126 (lines=7) @@ | ||
117 | $endOffset = min($endOffset, $startOffset + $first); |
|
118 | } |
|
119 | ||
120 | if (is_numeric($last)) { |
|
121 | if ($last < 0) { |
|
122 | throw new \InvalidArgumentException('Argument "last" must be a non-negative integer'); |
|
123 | } |
|
124 | ||
125 | $startOffset = max($startOffset, $endOffset - $last); |
|
126 | } |
|
127 | ||
128 | // If supplied slice is too large, trim it down before mapping over it. |
|
129 | $offset = max($startOffset - $sliceStart, 0); |