Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | class Str extends BaseStr |
||
8 | { |
||
9 | /** |
||
10 | * Get the portion of a string before the last occurrence of a given value. |
||
11 | * |
||
12 | * The beforeLast method wasn't added to the Str class until Laravel 6.x. |
||
13 | * Add the implementation here to support older versions of Laravel. |
||
14 | * |
||
15 | * @param string $subject |
||
16 | * @param string $search |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | 1099 | public static function beforeLast($subject, $search) |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Returns the portion of string specified by the start and length parameters. |
||
37 | * |
||
38 | * The substr method wasn't added to the Str class until Laravel 5.1. |
||
39 | * Add the implementation here to support older versions of Laravel. |
||
40 | * |
||
41 | * @param string $string |
||
42 | * @param int $start |
||
43 | * @param int|null $length |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | 483 | public static function substr($string, $start, $length = null) |
|
52 |