Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
24 | public function __construct(PropertyGenerator $suffixInterceptor) |
||
25 | { |
||
26 | 1 | parent::__construct('setMethodSuffixInterceptor'); |
|
27 | |||
28 | 1 | $interceptor = new ParameterGenerator('suffixInterceptor'); |
|
29 | |||
30 | 1 | $interceptor->setType(Closure::class); |
|
31 | $interceptor->setDefaultValue(null); |
||
32 | 1 | $this->setParameter(new ParameterGenerator('methodName', 'string')); |
|
33 | 1 | $this->setParameter($interceptor); |
|
34 | 1 | $this->setReturnType('void'); |
|
35 | 1 | $this->setBody('$this->' . $suffixInterceptor->getName() . '[$methodName] = $suffixInterceptor;'); |
|
36 | 1 | } |
|
37 | } |
||
38 |