1 | <?php |
||
8 | class Sitemap extends Tag |
||
9 | { |
||
10 | /** @var string */ |
||
11 | public $url = ''; |
||
12 | |||
13 | /** @var \Carbon\Carbon */ |
||
14 | public $lastModificationDate; |
||
15 | |||
16 | public static function create(string $url): self |
||
20 | |||
21 | public function __construct(string $url) |
||
27 | |||
28 | /** |
||
29 | * @param string $url |
||
30 | * |
||
31 | * @return $this |
||
32 | */ |
||
33 | public function setUrl(string $url = '') |
||
39 | |||
40 | /** |
||
41 | * @param \DateTime $lastModificationDate |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function setLastModificationDate(DateTime $lastModificationDate) |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function path(): string |
||
59 | } |
||
60 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.