| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 1 | CRAP | 27.27% covered (danger) | 27.27% | 3 / 11
CallTypeHintPass | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.46 | 27.27% covered (danger) | 27.27% | 3 / 11
apply($code, MockConfiguration $config) | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.46 | 27.27% covered (danger) | 27.27% | 3 / 11

1 | <?php
2 |
3 | namespace Mockery\Generator\StringManipulation\Pass;
4 |
5 | use Mockery\Generator\MockConfiguration;
6 |
7 | class CallTypeHintPass implements Pass
8 | {
9 | public function apply($code, MockConfiguration $config)
10 | {
11 | if ($config->requiresCallTypeHintRemoval()) {
12 | $code = str_replace(
13 | 'public function __call($method, array $args)',
14 | 'public function __call($method, $args)',
15 | $code
16 | );
17 | }
18 |
19 | if ($config->requiresCallStaticTypeHintRemoval()) {
20 | $code = str_replace(
21 | 'public static function __callStatic($method, array $args)',
22 | 'public static function __callStatic($method, $args)',
23 | $code
24 | );
25 | }
26 |
27 | return $code;
28 | }
29 | }