It seems like $pdo->prepare($sql) of type object<PDOStatement> is incompatible with the declared type object<Germania\Addresses\PDOStmt> of property $stmt.
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...
31
}
32
33
34
35
public function __invoke( PdoAddressInterface $address ) : int
36
{
37
if (!$id = $address->getId())
38
throw new \UnexpectedValueException("Addess object 'getId' did not return primary key value");
39
40
$result = $this->stmt->execute([
41
'id' => $id,
42
'type' => $address->getType(),
43
'street1' => $address->getStreet1(),
44
'street2' => $address->getStreet2(),
45
'zip' => $address->getZip(),
46
'location' => $address->getLocation(),
47
'country' => $address->getCountry()
48
]);
49
50
if (!$result) {
51
$msg = sprintf("Could not execute PDOStatement for address ID '%s'", $id);
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..