Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
23.08% |
3 / 13 |
CallTypeHintPass | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
7.10 | |
23.08% |
3 / 13 |
apply | |
0.00% |
0 / 1 |
7.10 | |
23.08% |
3 / 13 |
<?php | |
namespace Mockery\Generator\StringManipulation\Pass; | |
use Mockery\Generator\MockConfiguration; | |
class CallTypeHintPass implements Pass | |
{ | |
public function apply($code, MockConfiguration $config) | |
{ | |
if ($config->requiresCallTypeHintRemoval()) { | |
$code = str_replace( | |
'public function __call($method, array $args)', | |
'public function __call($method, $args)', | |
$code | |
); | |
} | |
if ($config->requiresCallStaticTypeHintRemoval()) { | |
$code = str_replace( | |
'public static function __callStatic($method, array $args)', | |
'public static function __callStatic($method, $args)', | |
$code | |
); | |
} | |
return $code; | |
} | |
} |