The method getProduct() does not exist on Dynamic\FoxyStripe\Exten...\QuantityFieldExtension.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
18
if (!$this->owner->/** @scrutinizer ignore-call */ getProduct()->getHasInventory()) {
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
The method setAttribute() does not exist on Dynamic\FoxyStripe\Exten...\QuantityFieldExtension.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
21
$this->owner->/** @scrutinizer ignore-call */
22
setAttribute(
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
Loading history...
22
'data-limit',
23
$this->owner->getProduct()->getNumberAvailable()
24
);
25
}
26
27
/**
28
* Limit the quantity to the number available
29
* @param $quantity
30
*/
31
public function updateQuantity(&$quantity)
32
{
33
if (!$this->owner->getProduct()->getHasInventory()) {
34
return;
35
}
36
37
if ($quantity >= $this->owner->getProduct()->getNumberAvailable()) {
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.