| Conditions | 4 | 
| Paths | 6 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 25 | public function __construct(array $data) | ||
| 26 |     { | ||
| 27 |         if (isset($data['value'])) { | ||
| 28 | $data['routeName'] = $data['value']; | ||
| 29 | unset($data['value']); | ||
| 30 | } | ||
| 31 | |||
| 32 |         foreach ($data as $key => $value) { | ||
| 33 |             $method = 'set'.str_replace('_', '', $key); | ||
| 34 |             if (!method_exists($this, $method)) { | ||
| 35 |                 throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, get_class($this))); | ||
| 36 | } | ||
| 37 | $this->$method($value); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 57 |