1 | <?php |
||
22 | abstract class AbstractSitemapServiceTestCase extends TestCase |
||
23 | { |
||
24 | protected $router; |
||
25 | |||
26 | /** |
||
27 | * @var SitemapServiceInterface |
||
28 | */ |
||
29 | protected $service; |
||
30 | |||
31 | /** |
||
32 | * @var array[] |
||
33 | */ |
||
34 | private $urls = []; |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | protected function setUp(): void |
||
45 | |||
46 | /** |
||
47 | * @return SitemapServiceInterface |
||
48 | */ |
||
49 | abstract protected function createService(): SitemapServiceInterface; |
||
50 | |||
51 | /** |
||
52 | * @param SitemapDefinitionInterface $sitemap |
||
53 | */ |
||
54 | final protected function process(SitemapDefinitionInterface $sitemap): void |
||
88 | |||
89 | /** |
||
90 | * @param string $location |
||
91 | * @param int $priority |
||
92 | * @param string $changeFreq |
||
93 | * @param DateTime|null $lastMod |
||
94 | */ |
||
95 | final protected function assertSitemap(string $location, int $priority, string $changeFreq, DateTime $lastMod = null): void |
||
99 | |||
100 | /** |
||
101 | * @param int $count |
||
102 | */ |
||
103 | final protected function assertSitemapCount(int $count): void |
||
107 | |||
108 | /** |
||
109 | * @param UrlInterface $url |
||
110 | * |
||
111 | * @return int |
||
112 | */ |
||
113 | private function getUrlIndex(UrlInterface $url): int |
||
123 | |||
124 | /** |
||
125 | * @param array|null $data |
||
126 | * @param UrlInterface $url |
||
127 | */ |
||
128 | private function assertLastmod(?array $data, UrlInterface $url): void |
||
142 | |||
143 | /** |
||
144 | * @param UrlInterface $url |
||
145 | * @param array|null $data |
||
146 | */ |
||
147 | private function assertPriority(UrlInterface $url, ?array $data): void |
||
160 | |||
161 | /** |
||
162 | * @param UrlInterface $url |
||
163 | * @param array|null $data |
||
164 | */ |
||
165 | private function assertChangeFreq(UrlInterface $url, ?array $data): void |
||
178 | } |
||
179 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: