| Conditions | 5 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 397 | public function apply($code, MockConfiguration $config) |
|
| 38 | { |
||
| 39 | 397 | $target = $config->getTargetClass(); |
|
| 40 | |||
| 41 | 397 | if (!$target) { |
|
| 42 | 28 | return $code; |
|
| 43 | } |
||
| 44 | |||
| 45 | 373 | foreach ($target->getMethods() as $method) { |
|
| 46 | 107 | if ($method->isFinal() && isset($this->methods[$method->getName()])) { |
|
| 47 | 1 | $code = preg_replace($this->methods[$method->getName()], '', $code); |
|
| 48 | 1 | } |
|
| 49 | 373 | } |
|
| 50 | |||
| 51 | 373 | return $code; |
|
| 52 | } |
||
| 53 | } |
||
| 54 |