Skip to content

Commit 599023f

Browse files
committed
Fix Condition::build
Signed-off-by: Kamil Tekiela <[email protected]>
1 parent 04b07f2 commit 599023f

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,6 @@ parameters:
7575
count: 2
7676
path: src/Components/CaseExpression.php
7777

78-
-
79-
message: "#^Parameter \\#1 \\$component of static method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:build\\(\\) expects array\\<PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\>, \\$this\\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\) given\\.$#"
80-
count: 1
81-
path: src/Components/Condition.php
82-
83-
-
84-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
85-
count: 1
86-
path: src/Components/Condition.php
87-
8878
-
8979
message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$name \\(string\\|null\\) does not accept mixed\\.$#"
9080
count: 2

psalm-baseline.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,30 +128,15 @@
128128
</MoreSpecificImplementedParamType>
129129
</file>
130130
<file src="src/Components/Condition.php">
131-
<InvalidArgument>
132-
<code>$this</code>
133-
</InvalidArgument>
134131
<MixedArrayOffset>
135132
<code><![CDATA[static::$allowedKeywords[$token->value]]]></code>
136133
</MixedArrayOffset>
137-
<MixedInferredReturnType>
138-
<code>string</code>
139-
</MixedInferredReturnType>
140-
<MixedPropertyFetch>
141-
<code><![CDATA[$component->expr]]></code>
142-
</MixedPropertyFetch>
143-
<MixedReturnStatement>
144-
<code><![CDATA[$component->expr]]></code>
145-
</MixedReturnStatement>
146134
<MoreSpecificImplementedParamType>
147135
<code>$component</code>
148136
</MoreSpecificImplementedParamType>
149137
<PossiblyUnusedProperty>
150138
<code>$isOperator</code>
151139
</PossiblyUnusedProperty>
152-
<RedundantConditionGivenDocblockType>
153-
<code>is_array($component)</code>
154-
</RedundantConditionGivenDocblockType>
155140
</file>
156141
<file src="src/Components/CreateDefinition.php">
157142
<MixedAssignment>

src/Components/Condition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ public static function parse(Parser $parser, TokensList $list, array $options =
221221
}
222222

223223
/**
224-
* @param Condition[] $component the component to be built
225-
* @param array<string, mixed> $options parameters for building
224+
* @param Condition[]|Condition $component the component to be built
225+
* @param array<string, mixed> $options parameters for building
226226
*/
227227
public static function build($component, array $options = []): string
228228
{

0 commit comments

Comments
 (0)