1 | <?php |
||
12 | class InsertOrUpdateItemCode |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The database table to work with |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | public $table; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * @var PDOStatement |
||
25 | */ |
||
26 | protected $stmt; |
||
27 | |||
28 | /** |
||
29 | * @var PDO |
||
30 | */ |
||
31 | protected $pdo; |
||
32 | |||
33 | /** |
||
34 | * @var LoggerInterface |
||
35 | */ |
||
36 | protected $logger; |
||
37 | |||
38 | |||
39 | |||
40 | /** |
||
41 | * @param \PDO $pdo PDO instance |
||
42 | * @param string $table Table name to work with. |
||
43 | * @param LoggerInterface|null $logger Optional: PSR3 Logger |
||
44 | */ |
||
45 | 12 | public function __construct(\PDO $pdo, $table, LoggerInterface $logger = null) |
|
58 | |||
59 | |||
60 | /** |
||
61 | * @param ItemCodeInterface $itemcode |
||
62 | * @return int Number of affected rows, i.e. 2 on REPLACE, 1 on INSERT) |
||
63 | */ |
||
64 | 4 | public function __invoke( ItemCodeInterface $itemcode ) |
|
68 | |||
69 | |||
70 | /** |
||
71 | * @param ItemCodeInterface $itemcode |
||
72 | * @return int Number of affected rows, i.e. 2 on REPLACE, 1 on INSERT) |
||
73 | */ |
||
74 | 12 | public function execute( ItemCodeInterface $itemcode ) |
|
89 | |||
90 | } |
||
91 |
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..