EventSaucePHP /
EventSauce
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace EventSauce\EventSourcing\Upcasting; |
||
| 6 | |||
| 7 | class UpcasterChain implements Upcaster |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var list<Upcaster> |
||
|
0 ignored issues
–
show
|
|||
| 11 | */ |
||
| 12 | private array $upcasters; |
||
| 13 | |||
| 14 | public function __construct(Upcaster ...$upcasters) |
||
| 15 | { |
||
| 16 | $this->upcasters = $upcasters; |
||
|
0 ignored issues
–
show
It seems like
$upcasters of type array<integer,EventSauce...ing\Upcasting\Upcaster> is incompatible with the declared type EventSauce\EventSourcing\Upcasting\list of property $upcasters.
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.. Loading history...
|
|||
| 17 | } |
||
| 18 | |||
| 19 | public function upcast(array $message): array |
||
| 20 | { |
||
| 21 | foreach ($this->upcasters as $upcaster) { |
||
| 22 | $message = $upcaster->upcast($message); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $message; |
||
| 26 | } |
||
| 27 | } |
||
| 28 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths