| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ChainManager |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Imanghafoori\HeyMan\Chain |
||
| 11 | */ |
||
| 12 | private $chain; |
||
| 13 | |||
| 14 | public function startChain() |
||
| 15 | { |
||
| 16 | $this->chain = new Chain(); |
||
| 17 | $this->chain->chainInfo = [ |
||
|
|
|||
| 18 | 'beforeReaction' => [], |
||
| 19 | 'debugInfo' => ['file' => '', 'line' => '', 'args' => ''], |
||
| 20 | 'responseType' => 'nothing', |
||
| 21 | 'data' => [], |
||
| 22 | ]; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function submitChainConfig() |
||
| 26 | { |
||
| 27 | $callbackListener = resolve(ReactionFactory::class)->make(); |
||
| 28 | $this->get('eventManager')->commitChain($callbackListener); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function commitCalledMethod($args, $methodName) |
||
| 32 | { |
||
| 33 | $this->push('data', $args); |
||
| 34 | $this->set('responseType', $methodName); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function get($key) |
||
| 40 | } |
||
| 41 | |||
| 42 | public function set($key, $value) |
||
| 45 | } |
||
| 46 | |||
| 47 | public function push($key, $value) |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..