1 | <?php |
||
21 | class News implements SitemapProviderInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Get the Records |
||
26 | * |
||
27 | * @param integer $startPage |
||
28 | * @param array $basePages |
||
29 | * @param SitemapController $obj |
||
30 | * |
||
31 | * @throws \Exception |
||
32 | * @return array |
||
33 | */ |
||
34 | public function getRecords($startPage, $basePages, SitemapController $obj): array |
||
68 | |||
69 | /** |
||
70 | * Get the Categories single page ID |
||
71 | * |
||
72 | * @param $newsId |
||
73 | * |
||
74 | * @return bool|int |
||
75 | */ |
||
76 | protected function alternativeSinglePid($newsId) |
||
93 | |||
94 | /** |
||
95 | * Based on t3lib_Befunc::getRecordsByField |
||
96 | * |
||
97 | * @param string $theTable |
||
98 | * @param string $theField |
||
99 | * @param string $theValue |
||
100 | * @param string $whereClause |
||
101 | * @param string $groupBy |
||
102 | * @param string $orderBy |
||
103 | * @param string $limit |
||
104 | * @param bool $useDeleteClause |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | public function getRecordsByField( |
||
132 | |||
133 | /** |
||
134 | * Get the priority |
||
135 | * |
||
136 | * @param array $record |
||
137 | * |
||
138 | * @internal param int $startPage |
||
139 | * @return float |
||
140 | */ |
||
141 | protected function getPriority($record) |
||
149 | |||
150 | /** |
||
151 | * get the modifiedDate |
||
152 | * |
||
153 | * @param array $record |
||
154 | * |
||
155 | * @return integer |
||
156 | */ |
||
157 | protected function getModifiedDate($record) |
||
166 | |||
167 | /** |
||
168 | * Get the database connection |
||
169 | * |
||
170 | * @return \TYPO3\CMS\Core\Database\DatabaseConnection |
||
171 | */ |
||
172 | protected function getDatabaseConnection() |
||
176 | } |
||
177 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.