This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Due to PHP Bug #53727, is_subclass_of might return inconsistent results on some PHP versions if \Germania\Coupons\CouponSheetInterface::class can be an interface. If so, you could instead use ReflectionClass::implementsInterface.
Loading history...
28
throw new \InvalidArgumentException("Class name or instance of CouponSheetInterface expected.");
It seems like $pdo->prepare($sql) of type object<PDOStatement> is incompatible with the declared type object<Germania\Coupons\PDOStatement> 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..
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.