| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 14 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 12 | public function __get($name) | ||
| 13 |     { | ||
| 14 |         if (method_exists($this, $name)) { | ||
| 15 | return $this->$name(); | ||
| 16 | } | ||
| 17 | |||
| 18 |         foreach (array('get', 'to') as $prefix) { | ||
| 19 | $method = $prefix . ucfirst($name); | ||
| 20 |             if (method_exists($this, $method)) { | ||
| 21 | return $this->$method(); | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 |         throw new \Exception(sprintf('%s is an undefined property', $name)); | ||
| 26 | } | ||
| 45 |