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: }
30: