@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $regexpKey = '(?:\'(?:[^\']++|\\\\.)*\'|"(?:[^"]++|\\\\.)*"|[^,\'"\=]++|[\'"])*'; |
| 23 | 23 | $regexpValue = '\'(?:[^\']++|\\\\.)*\'|(?:"(?:[^"]++|\\\\.)*"|[^,\'"]+|[\'"])*'; |
| 24 | - $regexp = '/(?<=^|,)(?:(?<key>' . $regexpKey . ')\s*=\s*)?(?<value>' . $regexpValue. ')\s*/'; |
|
| 24 | + $regexp = '/(?<=^|,)(?:(?<key>' . $regexpKey . ')\s*=\s*)?(?<value>' . $regexpValue . ')\s*/'; |
|
| 25 | 25 | |
| 26 | 26 | preg_match_all($regexp, $value, $matches, PREG_PATTERN_ORDER); // regex can't fail |
| 27 | 27 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public function process(array $notations, string $value): array |
| 24 | 24 | { |
| 25 | 25 | $regexp = '/^(?<location>(?:[^"]\S*|"[^"]+"))(?:\s*(?<start_line>\d+)' |
| 26 | - . '(?:\s*(?<number_of_lines>\d+))?)?(?:\s*(?<description>.+))?/'; |
|
| 26 | + . '(?:\s*(?<number_of_lines>\d+))?)?(?:\s*(?<description>.+))?/'; |
|
| 27 | 27 | |
| 28 | 28 | if (!preg_match($regexp, $value, $matches)) { |
| 29 | 29 | throw new PhpdocException("Failed to parse '@{$this->name} $value': invalid syntax"); |