| 1 | <?php |
||
| 17 | abstract class StatementAbstract implements StatementInterface{ |
||
| 18 | |||
| 19 | protected $DBDriver; |
||
| 20 | protected $dialect; |
||
| 21 | protected $quotes; |
||
| 22 | |||
| 23 | public function __construct(DBDriverInterface $DBDriver, string $dialect){ |
||
| 28 | |||
| 29 | public function sql():string { |
||
| 32 | |||
| 33 | public function execute(){ |
||
| 36 | |||
| 37 | public function quote(string $str):string{ |
||
| 42 | |||
| 43 | } |
||
| 44 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: