Skip to content

Commit 66af1f7

Browse files
committed
import
1 parent b2dd9e9 commit 66af1f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/jblond/Diff.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
namespace jblond;
66

7+
use InvalidArgumentException;
78
use jblond\Diff\SequenceMatcher;
9+
use OutOfRangeException;
810

911
/**
1012
* Diff
@@ -152,14 +154,14 @@ public function render(object $renderer)
152154
* @param int|null $end The last element of the range to get.
153155
* If not supplied, only the element at start will be returned.
154156
*
155-
* @throws \OutOfRangeException When the value of start or end are invalid to define a range.
157+
* @throws OutOfRangeException When the value of start or end are invalid to define a range.
156158
*
157159
* @return array Array containing all of the elements of the specified range.
158160
*/
159161
public function getArrayRange(array $array, int $start = 0, $end = null): array
160162
{
161163
if ($start < 0 || $end < 0 || $end < $start) {
162-
throw new \OutOfRangeException('Start parameter must be lower than End parameter while both are positive!');
164+
throw new OutOfRangeException('Start parameter must be lower than End parameter while both are positive!');
163165
}
164166

165167
if ($start == 0 && $end === null) {
@@ -187,7 +189,7 @@ public function getArrayRange(array $array, int $start = 0, $end = null): array
187189
*
188190
* @param mixed $var Variable to get type from.
189191
*
190-
* @throws \InvalidArgumentException When the type isn't 'array' or 'string'.
192+
* @throws InvalidArgumentException When the type isn't 'array' or 'string'.
191193
*
192194
* @return int Number indicating the type of the variable. 0 for array type and 1 for string type.
193195
*/
@@ -199,7 +201,7 @@ public function getArgumentType($var): int
199201
case (is_string($var)):
200202
return 1;
201203
default:
202-
throw new \InvalidArgumentException('Invalid argument type! Argument must be of type array or string.');
204+
throw new InvalidArgumentException('Invalid argument type! Argument must be of type array or string.');
203205
}
204206
}
205207

0 commit comments

Comments
 (0)