| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 18 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 8 | public function traitor($method_name) | ||
| 9 |     { | ||
| 10 | $ret = []; | ||
| 11 | |||
| 12 | $regex = sprintf($this->traitorPattern(), $method_name); | ||
| 13 | |||
| 14 | $traits = (new \ReflectionClass($this))->getTraitNames(); | ||
| 15 |         foreach ($traits as $trait_name) { | ||
| 16 | $trait_methods = (new \ReflectionClass($trait_name))->getMethods(); | ||
| 17 |             foreach ($trait_methods as $method) { | ||
| 18 |                 if (preg_match($regex, $method->name, $match) === 1) { | ||
| 19 | $callable = current($match); | ||
| 20 | $ret[$this->traitorReturnIndex($trait_name, $method->name)] = $this->$callable(); | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | return $ret; | ||
| 26 | } | ||
| 39 |