| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 18 | public function getDataProvider(ExampleNode $example): ?string |
||
| 19 | { |
||
| 20 | $method = $example->getFunctionReflection(); |
||
| 21 | |||
| 22 | $docComment = $method->getDocComment(); |
||
| 23 | if (!is_string($docComment)) { |
||
| 24 | return null; |
||
| 25 | } |
||
| 26 | |||
| 27 | if (!preg_match(self::DATA_PROVIDER_REGEX, $docComment, $matches)) { |
||
| 28 | return null; |
||
| 29 | } |
||
| 30 | |||
| 31 | return $matches[1]; |
||
| 32 | } |
||
| 34 |