4
4
5
5
namespace jblond ;
6
6
7
+ use InvalidArgumentException ;
7
8
use jblond \Diff \SequenceMatcher ;
9
+ use OutOfRangeException ;
8
10
9
11
/**
10
12
* Diff
@@ -152,14 +154,14 @@ public function render(object $renderer)
152
154
* @param int|null $end The last element of the range to get.
153
155
* If not supplied, only the element at start will be returned.
154
156
*
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.
156
158
*
157
159
* @return array Array containing all of the elements of the specified range.
158
160
*/
159
161
public function getArrayRange (array $ array , int $ start = 0 , $ end = null ): array
160
162
{
161
163
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! ' );
163
165
}
164
166
165
167
if ($ start == 0 && $ end === null ) {
@@ -187,7 +189,7 @@ public function getArrayRange(array $array, int $start = 0, $end = null): array
187
189
*
188
190
* @param mixed $var Variable to get type from.
189
191
*
190
- * @throws \ InvalidArgumentException When the type isn't 'array' or 'string'.
192
+ * @throws InvalidArgumentException When the type isn't 'array' or 'string'.
191
193
*
192
194
* @return int Number indicating the type of the variable. 0 for array type and 1 for string type.
193
195
*/
@@ -199,7 +201,7 @@ public function getArgumentType($var): int
199
201
case (is_string ($ var )):
200
202
return 1 ;
201
203
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. ' );
203
205
}
204
206
}
205
207
0 commit comments