Skip to content

Commit

Permalink
Introduce typed variable
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Nov 28, 2021
1 parent 36fc97c commit a1bb68a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions libraries/classes/Menu.php
Expand Up @@ -142,9 +142,10 @@ private function getAllowedTabs($level)
$result = $this->relation->queryAsControlUser($sqlQuery, false);
if ($result) {
while ($row = $this->dbi->fetchAssoc($result)) {
$tab = (string) $row['tab'];
$tabName = mb_substr(
$row['tab'],
mb_strpos($row['tab'], '_') + 1
$tab,
mb_strpos($tab, '_') + 1
);
unset($allowedTabs[$tabName]);
}
Expand Down
6 changes: 2 additions & 4 deletions psalm-baseline.xml
Expand Up @@ -8549,10 +8549,8 @@
</UnusedFunctionCall>
</file>
<file src="libraries/classes/Menu.php">
<MixedArgument occurrences="3">
<MixedArgument occurrences="1">
<code>$result</code>
<code>$row['tab']</code>
<code>$row['tab']</code>
</MixedArgument>
<MixedAssignment occurrences="2">
<code>$binaryLogs</code>
Expand All @@ -8568,7 +8566,7 @@
<code>SessionCache::get($cacheKey)</code>
</NullableReturnStatement>
<PossiblyFalseOperand occurrences="1">
<code>mb_strpos($row['tab'], '_')</code>
<code>mb_strpos($tab, '_')</code>
</PossiblyFalseOperand>
<PossiblyInvalidArgument occurrences="1">
<code>$result</code>
Expand Down

0 comments on commit a1bb68a

Please sign in to comment.