| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function __construct($object, $method) { |
||
| 27 | $this->annotations = []; |
||
| 28 | |||
| 29 | $reflection = new \ReflectionMethod($object, $method); |
||
| 30 | $docs = $reflection->getDocComment(); |
||
| 31 | |||
| 32 | // extract everything prefixed by @ and first letter uppercase |
||
| 33 | \preg_match_all('/@([A-Z]\w+)/', $docs, $matches); |
||
| 34 | $this->annotations = $matches[1]; |
||
| 35 | } |
||
| 46 |