| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0987 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 44 | 2 | private function perform(ActionInterface $action): void |
|
| 45 | { |
||
| 46 | 2 | if ($action->isDue() === false) { |
|
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | $this->mutex->acquire($action->getKey())->then(function ($lock) use ($action) { |
||
| 51 | 2 | if ($lock === false) { |
|
| 52 | return; |
||
| 53 | } |
||
| 54 | |||
| 55 | return $action->perform()->then(function () use ($action, $lock) { |
||
| 56 | 2 | return $this->mutex->release($lock); |
|
| 57 | 2 | }); |
|
| 58 | 2 | })->done(); |
|
| 59 | 2 | } |
|
| 60 | } |
||
| 61 |
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..