Since Domain\Model\Article\VO\Storage is declared final, using late-static binding will have no effect. You might want to replace static with self instead.
Late static binding only has effect in subclasses.
A final class cannot be extended anymore so late static binding cannot occurr.
Consider replacing static:: with self::.
To learn more about late static binding, please refer to the PHP core
documentation.
Since Domain\Model\Article\VO\Storage is declared final, using late-static binding will have no effect. You might want to replace static with self instead.
Late static binding only has effect in subclasses.
A final class cannot be extended anymore so late static binding cannot occurr.
Consider replacing static:: with self::.
To learn more about late static binding, please refer to the PHP core
documentation.
Loading history...
49
50
return new self($unit, $quantity);
51
}
52
53
/**
54
* Test the unit.
55
*
56
* @param string $unit
57
*
58
* @return string
59
*/
60
private static function unit(string $unit): string
61
{
62
if (!in_array(strtolower($unit), self::UNITS)) {
63
throw new InvalidUnit();
64
}
65
66
return strtolower($unit);
67
}
68
69
/**
70
* Test the quantity.
71
*
72
* @param float $quantity
73
*
74
* @return float
75
*/
76
private static function quantity(float $quantity): float
Late static binding only has effect in subclasses. A
finalclass cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::withself::.To learn more about late static binding, please refer to the PHP core documentation.