Conditions | 3 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
75 | protected function processing(): void |
||
76 | { |
||
77 | $this->path = \preg_replace_callback( |
||
78 | '~\<(?<key>\w+):(?<value>.+?)>~', |
||
79 | function (array $matches) { |
||
80 | |||
81 | if (!empty($this->regex[$matches['key']])) { |
||
82 | throw new Runtime(\sprintf( |
||
83 | 'duplicate in registry key `%s` for path `%s`', |
||
84 | $matches['key'], |
||
85 | $this->path |
||
86 | )); |
||
87 | } |
||
88 | |||
89 | if (!empty($matches['value'])) |
||
90 | { |
||
91 | $this->regex[$matches['key']] = $matches['value']; |
||
92 | } |
||
93 | |||
94 | return '<' . $matches['key'] . '>'; |
||
95 | }, |
||
96 | $this->path |
||
97 | ); |
||
101 |