1 | <?php |
||
12 | class Url |
||
13 | { |
||
14 | const CHANGE_FREQ_ALWAYS = 'always'; |
||
15 | const CHANGE_FREQ_HOURLY = 'hourly'; |
||
16 | const CHANGE_FREQ_DAILY = 'daily'; |
||
17 | const CHANGE_FREQ_WEEKLY = 'weekly'; |
||
18 | const CHANGE_FREQ_MONTHLY = 'monthly'; |
||
19 | const CHANGE_FREQ_YEARLY = 'yearly'; |
||
20 | const CHANGE_FREQ_NEVER = 'never'; |
||
21 | |||
22 | const DEFAULT_PRIORITY = '1.0'; |
||
23 | |||
24 | const DEFAULT_CHANGE_FREQ = self::CHANGE_FREQ_WEEKLY; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $loc = ''; |
||
30 | |||
31 | /** |
||
32 | * @var \DateTime |
||
33 | */ |
||
34 | private $last_mod; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $change_freq = ''; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $priority = ''; |
||
45 | |||
46 | /** |
||
47 | * @param string $loc |
||
48 | * @param \DateTimeImmutable|null $last_mod |
||
49 | * @param string|null $change_freq |
||
50 | * @param string|null $priority |
||
51 | */ |
||
52 | public function __construct($loc, \DateTimeImmutable $last_mod = null, $change_freq = null, $priority = null) |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getLoc() |
||
67 | |||
68 | /** |
||
69 | * @return \DateTime |
||
70 | */ |
||
71 | public function getLastMod() |
||
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getChangeFreq() |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getPriority() |
||
91 | } |
||
92 |
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..