Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
29 | 7 | public function process(array $notations, string $value): array |
|
30 | { |
||
31 | 7 | preg_match_all('/^\s*(?:(?:\/\*)?\*\s*)?([^@\s\/*].*?)\r?$/m', $value, $matches, PREG_PATTERN_ORDER); |
|
32 | |||
33 | 7 | if (!isset($matches[1]) || $matches[1] === []) { |
|
34 | 2 | return $notations; |
|
35 | } |
||
36 | |||
37 | 5 | $matches = $matches[1]; |
|
38 | |||
39 | 5 | $notations['summery'] = reset($matches); |
|
40 | 5 | $notations['description'] = implode("\n", $matches); |
|
41 | |||
42 | 5 | return $notations; |
|
43 | } |
||
45 |