| Total Complexity | 5 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class PregMatch |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @param Results\PregObject|null $object |
||
| 10 | * |
||
| 11 | * @return Results\PregObject |
||
| 12 | */ |
||
| 13 | 2 | protected static function pregObject(Results\PregObject $object = null): Results\PregObject |
|
| 14 | { |
||
| 15 | 2 | if (!$object) |
|
| 16 | { |
||
| 17 | 1 | return new Results\PregObject(); |
|
| 18 | } |
||
| 19 | |||
| 20 | 1 | return $object; |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $pattern |
||
| 25 | * @param string $subject |
||
| 26 | * @param Results\PregObject|null $object |
||
| 27 | * |
||
| 28 | * @return Results\PregObject |
||
| 29 | */ |
||
| 30 | 1 | public static function first($pattern, $subject, Results\PregObject $object = null): Results\PregObject |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $pattern |
||
| 47 | * @param string $subject |
||
| 48 | * @param Results\PregObject|null $object |
||
| 49 | * |
||
| 50 | * @return Results\PregObject |
||
| 51 | */ |
||
| 52 | 1 | public static function all($pattern, $subject, Results\PregObject $object = null): Results\PregObject |
|
| 66 | } |
||
| 67 | |||
| 69 |