| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 18 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 29 | public function apply($code, MockConfiguration $config)  | 
            ||
| 30 |     { | 
            ||
| 31 | 392 |         $names = array_map(function ($method) { | 
            |
| 32 | 107 | return $method->getName();  | 
            |
| 33 | 392 | }, $config->getMethodsToMock());  | 
            |
| 34 | |||
| 35 | 392 |         foreach (["allows", "expects"] as $method) { | 
            |
| 36 | 392 |             if (in_array($method, $names)) { | 
            |
| 37 | 2 | $code = preg_replace(  | 
            |
| 38 | 2 |                     "#// start method {$method}.*// end method {$method}#ms", | 
            |
| 39 | 2 | "",  | 
            |
| 40 | $code  | 
            ||
| 41 | 2 | );  | 
            |
| 42 | 2 | }  | 
            |
| 43 | 392 | }  | 
            |
| 44 | |||
| 45 | 392 | return $code;  | 
            |
| 46 | }  | 
            ||
| 47 | }  | 
            ||
| 48 |