Skip to content

Commit c78df57

Browse files
Merge pull request #362 from mauriciofauth/components-final
Add `@final` annotation to `Components` classes
2 parents f45b16c + 072143a commit c78df57

28 files changed

+57
-204
lines changed

phpstan-baseline.neon

Lines changed: 4 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ parameters:
8080
count: 1
8181
path: src/Components/AlterOperation.php
8282

83-
-
84-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
85-
count: 1
86-
path: src/Components/AlterOperation.php
87-
8883
-
8984
message: "#^array\\<PhpMyAdmin\\\\SqlParser\\\\Token\\>\\|string does not accept PhpMyAdmin\\\\SqlParser\\\\Token\\.$#"
9085
count: 2
@@ -110,21 +105,6 @@ parameters:
110105
count: 1
111106
path: src/Components/Array2d.php
112107

113-
-
114-
message: "#^Cannot access an offset on array\\<int, mixed\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
115-
count: 1
116-
path: src/Components/ArrayObj.php
117-
118-
-
119-
message: "#^Cannot access property \\$raw on array\\<int, mixed\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
120-
count: 2
121-
path: src/Components/ArrayObj.php
122-
123-
-
124-
message: "#^Cannot access property \\$values on array\\<int, mixed\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
125-
count: 2
126-
path: src/Components/ArrayObj.php
127-
128108
-
129109
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\:\\:__construct\\(\\) has parameter \\$raw with no value type specified in iterable type array\\.$#"
130110
count: 1
@@ -155,11 +135,6 @@ parameters:
155135
count: 1
156136
path: src/Components/ArrayObj.php
157137

158-
-
159-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
160-
count: 1
161-
path: src/Components/ArrayObj.php
162-
163138
-
164139
message: "#^Binary operation \"\\.\" between ' AS ' and array\\|string results in an error\\.$#"
165140
count: 1
@@ -211,17 +186,17 @@ parameters:
211186
path: src/Components/CaseExpression.php
212187

213188
-
214-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
189+
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
215190
count: 1
216-
path: src/Components/CaseExpression.php
191+
path: src/Components/Condition.php
217192

218193
-
219-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
194+
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:parse\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
220195
count: 1
221196
path: src/Components/Condition.php
222197

223198
-
224-
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition\\:\\:parse\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
199+
message: "#^Parameter \\#1 \\$expr of class PhpMyAdmin\\\\SqlParser\\\\Components\\\\Condition constructor expects string\\|null, mixed given\\.$#"
225200
count: 1
226201
path: src/Components/Condition.php
227202

@@ -245,11 +220,6 @@ parameters:
245220
count: 1
246221
path: src/Components/Condition.php
247222

248-
-
249-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
250-
count: 3
251-
path: src/Components/Condition.php
252-
253223
-
254224
message: "#^Binary operation \"\\.\" between array\\|string and ' ' results in an error\\.$#"
255225
count: 1
@@ -315,11 +285,6 @@ parameters:
315285
count: 3
316286
path: src/Components/CreateDefinition.php
317287

318-
-
319-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
320-
count: 2
321-
path: src/Components/CreateDefinition.php
322-
323288
-
324289
message: "#^Cannot access property \\$raw on array\\<PhpMyAdmin\\\\SqlParser\\\\Component\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
325290
count: 1
@@ -370,11 +335,6 @@ parameters:
370335
count: 1
371336
path: src/Components/DataType.php
372337

373-
-
374-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
375-
count: 1
376-
path: src/Components/DataType.php
377-
378338
-
379339
message: "#^Binary operation \"\\.\" between ' AS ' and array\\|string results in an error\\.$#"
380340
count: 1
@@ -465,11 +425,6 @@ parameters:
465425
count: 1
466426
path: src/Components/Expression.php
467427

468-
-
469-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
470-
count: 1
471-
path: src/Components/Expression.php
472-
473428
-
474429
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\ExpressionArray\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
475430
count: 1
@@ -515,11 +470,6 @@ parameters:
515470
count: 1
516471
path: src/Components/FunctionCall.php
517472

518-
-
519-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
520-
count: 1
521-
path: src/Components/FunctionCall.php
522-
523473
-
524474
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\GroupKeyword\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
525475
count: 1
@@ -540,11 +490,6 @@ parameters:
540490
count: 2
541491
path: src/Components/GroupKeyword.php
542492

543-
-
544-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
545-
count: 2
546-
path: src/Components/GroupKeyword.php
547-
548493
-
549494
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\IndexHint\\:\\:__construct\\(\\) has parameter \\$indexes with no value type specified in iterable type array\\.$#"
550495
count: 1
@@ -580,11 +525,6 @@ parameters:
580525
count: 1
581526
path: src/Components/IndexHint.php
582527

583-
-
584-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
585-
count: 3
586-
path: src/Components/IndexHint.php
587-
588528
-
589529
message: "#^Cannot access property \\$values on array\\<PhpMyAdmin\\\\SqlParser\\\\Component\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
590530
count: 1
@@ -675,11 +615,6 @@ parameters:
675615
count: 1
676616
path: src/Components/IntoKeyword.php
677617

678-
-
679-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
680-
count: 1
681-
path: src/Components/IntoKeyword.php
682-
683618
-
684619
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\JoinKeyword\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
685620
count: 1
@@ -725,11 +660,6 @@ parameters:
725660
count: 1
726661
path: src/Components/JoinKeyword.php
727662

728-
-
729-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
730-
count: 4
731-
path: src/Components/JoinKeyword.php
732-
733663
-
734664
message: "#^Array \\(array\\<array\\{name\\?\\: string, length\\?\\: int, order\\?\\: string\\}\\>\\) does not accept non\\-empty\\-array\\<string, mixed\\>\\.$#"
735665
count: 1
@@ -785,11 +715,6 @@ parameters:
785715
count: 1
786716
path: src/Components/Key.php
787717

788-
-
789-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
790-
count: 1
791-
path: src/Components/Key.php
792-
793718
-
794719
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\Limit\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
795720
count: 1
@@ -810,11 +735,6 @@ parameters:
810735
count: 1
811736
path: src/Components/Limit.php
812737

813-
-
814-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
815-
count: 1
816-
path: src/Components/Limit.php
817-
818738
-
819739
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\LockExpression\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
820740
count: 1
@@ -830,11 +750,6 @@ parameters:
830750
count: 1
831751
path: src/Components/LockExpression.php
832752

833-
-
834-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
835-
count: 1
836-
path: src/Components/LockExpression.php
837-
838753
-
839754
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
840755
count: 1
@@ -875,11 +790,6 @@ parameters:
875790
count: 1
876791
path: src/Components/OptionsArray.php
877792

878-
-
879-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
880-
count: 1
881-
path: src/Components/OptionsArray.php
882-
883793
-
884794
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\OrderKeyword\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
885795
count: 1
@@ -900,11 +810,6 @@ parameters:
900810
count: 2
901811
path: src/Components/OrderKeyword.php
902812

903-
-
904-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
905-
count: 2
906-
path: src/Components/OrderKeyword.php
907-
908813
-
909814
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\ParameterDefinition\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
910815
count: 1
@@ -945,11 +850,6 @@ parameters:
945850
count: 1
946851
path: src/Components/ParameterDefinition.php
947852

948-
-
949-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
950-
count: 2
951-
path: src/Components/ParameterDefinition.php
952-
953853
-
954854
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\PartitionDefinition\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
955855
count: 1
@@ -990,11 +890,6 @@ parameters:
990890
count: 1
991891
path: src/Components/PartitionDefinition.php
992892

993-
-
994-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
995-
count: 1
996-
path: src/Components/PartitionDefinition.php
997-
998893
-
999894
message: "#^Cannot access property \\$values on array\\<PhpMyAdmin\\\\SqlParser\\\\Component\\>\\|PhpMyAdmin\\\\SqlParser\\\\Components\\\\ArrayObj\\.$#"
1000895
count: 1
@@ -1040,11 +935,6 @@ parameters:
1040935
count: 2
1041936
path: src/Components/Reference.php
1042937

1043-
-
1044-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
1045-
count: 1
1046-
path: src/Components/Reference.php
1047-
1048938
-
1049939
message: "#^Call to function is_array\\(\\) with PhpMyAdmin\\\\SqlParser\\\\Components\\\\RenameOperation will always evaluate to false\\.$#"
1050940
count: 1
@@ -1080,11 +970,6 @@ parameters:
1080970
count: 2
1081971
path: src/Components/RenameOperation.php
1082972

1083-
-
1084-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
1085-
count: 2
1086-
path: src/Components/RenameOperation.php
1087-
1088973
-
1089974
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\SetOperation\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
1090975
count: 1
@@ -1095,11 +980,6 @@ parameters:
1095980
count: 1
1096981
path: src/Components/SetOperation.php
1097982

1098-
-
1099-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
1100-
count: 2
1101-
path: src/Components/SetOperation.php
1102-
1103983
-
1104984
message: "#^Method PhpMyAdmin\\\\SqlParser\\\\Components\\\\UnionKeyword\\:\\:build\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
1105985
count: 1

0 commit comments

Comments
 (0)