Skip to content

Commit 4342b42

Browse files
Merge pull request #18774 from kamil-tekiela/Display-Results-class
Refactor Results class
2 parents a3e2117 + 461655f commit 4342b42

11 files changed

Lines changed: 1004 additions & 1268 deletions

File tree

phpstan-baseline.neon

Lines changed: 30 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -9620,11 +9620,6 @@ parameters:
96209620
count: 3
96219621
path: src/Display/Results.php
96229622

9623-
-
9624-
message: "#^Cannot access an offset on mixed\\.$#"
9625-
count: 2
9626-
path: src/Display/Results.php
9627-
96289623
-
96299624
message: "#^Cannot access offset 'display_binary' on mixed\\.$#"
96309625
count: 8
@@ -9665,21 +9660,11 @@ parameters:
96659660
count: 1
96669661
path: src/Display/Results.php
96679662

9668-
-
9669-
message: "#^Cannot access offset 'input_transformation' on mixed\\.$#"
9670-
count: 1
9671-
path: src/Display/Results.php
9672-
96739663
-
96749664
message: "#^Cannot access offset 'max_rows' on mixed\\.$#"
96759665
count: 18
96769666
path: src/Display/Results.php
96779667

9678-
-
9679-
message: "#^Cannot access offset 'mimetype' on mixed\\.$#"
9680-
count: 1
9681-
path: src/Display/Results.php
9682-
96839668
-
96849669
message: "#^Cannot access offset 'pftext' on mixed\\.$#"
96859670
count: 9
@@ -9730,46 +9715,26 @@ parameters:
97309715
count: 1
97319716
path: src/Display/Results.php
97329717

9733-
-
9734-
message: "#^Cannot access offset 'transformation' on mixed\\.$#"
9735-
count: 1
9736-
path: src/Display/Results.php
9737-
9738-
-
9739-
message: "#^Cannot access offset 'transformation…' on mixed\\.$#"
9740-
count: 2
9741-
path: src/Display/Results.php
9742-
97439718
-
97449719
message: "#^Cannot access offset 0 on mixed\\.$#"
97459720
count: 1
97469721
path: src/Display/Results.php
97479722

9748-
-
9749-
message: "#^Cannot access offset int on mixed\\.$#"
9750-
count: 8
9751-
path: src/Display/Results.php
9752-
97539723
-
97549724
message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#"
97559725
count: 2
97569726
path: src/Display/Results.php
97579727

97589728
-
97599729
message: "#^Cannot access offset mixed on mixed\\.$#"
9760-
count: 6
9730+
count: 1
97619731
path: src/Display/Results.php
97629732

97639733
-
97649734
message: "#^Cannot access offset non\\-empty\\-string on mixed\\.$#"
97659735
count: 4
97669736
path: src/Display/Results.php
97679737

9768-
-
9769-
message: "#^Cannot access offset string on mixed\\.$#"
9770-
count: 5
9771-
path: src/Display/Results.php
9772-
97739738
-
97749739
message: "#^Cannot access property \\$alias on mixed\\.$#"
97759740
count: 1
@@ -9800,11 +9765,6 @@ parameters:
98009765
count: 1
98019766
path: src/Display/Results.php
98029767

9803-
-
9804-
message: "#^Cannot cast mixed to string\\.$#"
9805-
count: 3
9806-
path: src/Display/Results.php
9807-
98089768
-
98099769
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
98109770
count: 26
@@ -9845,11 +9805,6 @@ parameters:
98459805
count: 1
98469806
path: src/Display/Results.php
98479807

9848-
-
9849-
message: "#^Only booleans are allowed in &&, bool\\|null given on the left side\\.$#"
9850-
count: 2
9851-
path: src/Display/Results.php
9852-
98539808
-
98549809
message: "#^Only booleans are allowed in &&, mixed given on the left side\\.$#"
98559810
count: 1
@@ -9860,11 +9815,6 @@ parameters:
98609815
count: 3
98619816
path: src/Display/Results.php
98629817

9863-
-
9864-
message: "#^Only booleans are allowed in a negated boolean, bool\\|null given\\.$#"
9865-
count: 1
9866-
path: src/Display/Results.php
9867-
98689818
-
98699819
message: "#^Only booleans are allowed in a negated boolean, int\\|false given\\.$#"
98709820
count: 1
@@ -9890,31 +9840,11 @@ parameters:
98909840
count: 1
98919841
path: src/Display/Results.php
98929842

9893-
-
9894-
message: "#^Only booleans are allowed in an elseif condition, bool\\|null given\\.$#"
9895-
count: 1
9896-
path: src/Display/Results.php
9897-
9898-
-
9899-
message: "#^Only booleans are allowed in an if condition, bool\\|null given\\.$#"
9900-
count: 1
9901-
path: src/Display/Results.php
9902-
99039843
-
99049844
message: "#^Only booleans are allowed in an if condition, int\\|false given\\.$#"
99059845
count: 3
99069846
path: src/Display/Results.php
99079847

9908-
-
9909-
message: "#^Only booleans are allowed in \\|\\|, bool\\|null given on the left side\\.$#"
9910-
count: 2
9911-
path: src/Display/Results.php
9912-
9913-
-
9914-
message: "#^Only booleans are allowed in \\|\\|, bool\\|null given on the right side\\.$#"
9915-
count: 6
9916-
path: src/Display/Results.php
9917-
99189848
-
99199849
message: "#^Only booleans are allowed in \\|\\|, int\\<0, max\\>\\|false given on the left side\\.$#"
99209850
count: 1
@@ -9950,49 +9880,24 @@ parameters:
99509880
count: 1
99519881
path: src/Display/Results.php
99529882

9953-
-
9954-
message: "#^Parameter \\#1 \\$numEmptyColumnsBefore of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getRepeatingHeaders\\(\\) expects int, mixed given\\.$#"
9955-
count: 1
9956-
path: src/Display/Results.php
9957-
99589883
-
99599884
message: "#^Parameter \\#1 \\$offset of method PhpMyAdmin\\\\Dbal\\\\ResultInterface\\:\\:seek\\(\\) expects int, float\\|int given\\.$#"
99609885
count: 2
99619886
path: src/Display/Results.php
99629887

9963-
-
9964-
message: "#^Parameter \\#1 \\$optionString of method PhpMyAdmin\\\\Transformations\\:\\:getOptions\\(\\) expects string, mixed given\\.$#"
9965-
count: 2
9966-
path: src/Display/Results.php
9967-
99689888
-
99699889
message: "#^Parameter \\#1 \\$params of static method PhpMyAdmin\\\\Url\\:\\:getCommon\\(\\) expects array\\<string, bool\\|int\\|string\\>, array\\<int\\|string, mixed\\> given\\.$#"
99709890
count: 1
99719891
path: src/Display/Results.php
99729892

9973-
-
9974-
message: "#^Parameter \\#1 \\$params of static method PhpMyAdmin\\\\Url\\:\\:getCommon\\(\\) expects array\\<string, bool\\|int\\|string\\>, array\\<string, mixed\\> given\\.$#"
9975-
count: 1
9976-
path: src/Display/Results.php
9977-
9978-
-
9979-
message: "#^Parameter \\#1 \\$params of static method PhpMyAdmin\\\\Url\\:\\:getCommonRaw\\(\\) expects array\\<int\\|string, bool\\|int\\|string\\>, array\\<string, mixed\\> given\\.$#"
9980-
count: 1
9981-
path: src/Display/Results.php
9982-
99839893
-
99849894
message: "#^Parameter \\#1 \\$params of static method PhpMyAdmin\\\\Url\\:\\:getCommonRaw\\(\\) expects array\\<int\\|string, bool\\|int\\|string\\>, array\\<string, string\\|null\\> given\\.$#"
9985-
count: 1
9895+
count: 2
99869896
path: src/Display/Results.php
99879897

99889898
-
99899899
message: "#^Parameter \\#1 \\$sqlQuery of static method PhpMyAdmin\\\\Core\\:\\:signSqlQuery\\(\\) expects string, mixed given\\.$#"
9990-
count: 4
9991-
path: src/Display/Results.php
9992-
9993-
-
9994-
message: "#^Parameter \\#1 \\$string of function trim expects string, mixed given\\.$#"
9995-
count: 1
9900+
count: 3
99969901
path: src/Display/Results.php
99979902

99989903
-
@@ -10015,16 +9920,6 @@ parameters:
100159920
count: 1
100169921
path: src/Display/Results.php
100179922

10018-
-
10019-
message: "#^Parameter \\#2 \\$columnValue of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getSpecialLinkUrl\\(\\) expects string\\|null, mixed given\\.$#"
10020-
count: 1
10021-
path: src/Display/Results.php
10022-
10023-
-
10024-
message: "#^Parameter \\#2 \\$descriptions of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getRepeatingHeaders\\(\\) expects array\\<string\\>, mixed given\\.$#"
10025-
count: 1
10026-
path: src/Display/Results.php
10027-
100289923
-
100299924
message: "#^Parameter \\#2 \\$field of class PhpMyAdmin\\\\Display\\\\ForeignKeyRelatedTable constructor expects string, mixed given\\.$#"
100309925
count: 2
@@ -10070,19 +9965,9 @@ parameters:
100709965
count: 1
100719966
path: src/Display/Results.php
100729967

10073-
-
10074-
message: "#^Parameter \\#3 \\$numEmptyColumnsAfter of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getRepeatingHeaders\\(\\) expects int, mixed given\\.$#"
10075-
count: 1
10076-
path: src/Display/Results.php
10077-
10078-
-
10079-
message: "#^Parameter \\#3 \\$row of static method PhpMyAdmin\\\\Util\\:\\:getUniqueCondition\\(\\) expects array\\<int, mixed\\>, array given\\.$#"
10080-
count: 1
10081-
path: src/Display/Results.php
10082-
100839968
-
100849969
message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, mixed given\\.$#"
10085-
count: 4
9970+
count: 3
100869971
path: src/Display/Results.php
100879972

100889973
-
@@ -10120,16 +10005,6 @@ parameters:
1012010005
count: 1
1012110006
path: src/Display/Results.php
1012210007

10123-
-
10124-
message: "#^Property PhpMyAdmin\\\\Display\\\\Results\\:\\:\\$properties type has no value type specified in iterable type array\\.$#"
10125-
count: 4
10126-
path: src/Display/Results.php
10127-
10128-
-
10129-
message: "#^Property PhpMyAdmin\\\\FieldMetadata\\:\\:\\$internalMediaType \\(string\\|null\\) does not accept \\(array\\<int, string\\>\\|string\\)\\.$#"
10130-
count: 1
10131-
path: src/Display/Results.php
10132-
1013310008
-
1013410009
message: "#^Property PhpMyAdmin\\\\FieldMetadata\\:\\:\\$name \\(non\\-empty\\-string\\) does not accept mixed\\.$#"
1013510010
count: 1
@@ -12106,27 +11981,27 @@ parameters:
1210611981
path: src/InsertEdit.php
1210711982

1210811983
-
12109-
message: "#^Parameter \\#2 \\$signature of static method PhpMyAdmin\\\\Core\\:\\:checkSqlQuerySignature\\(\\) expects string, mixed given\\.$#"
11984+
message: "#^Parameter \\#2 \\$row of class PhpMyAdmin\\\\UniqueCondition constructor expects array\\<int, mixed\\>, mixed given\\.$#"
1211011985
count: 1
1211111986
path: src/InsertEdit.php
1211211987

1211311988
-
12114-
message: "#^Parameter \\#2 \\$specInBrackets of method PhpMyAdmin\\\\InsertEdit\\:\\:getColumnSize\\(\\) expects string, mixed given\\.$#"
11989+
message: "#^Parameter \\#2 \\$signature of static method PhpMyAdmin\\\\Core\\:\\:checkSqlQuerySignature\\(\\) expects string, mixed given\\.$#"
1211511990
count: 1
1211611991
path: src/InsertEdit.php
1211711992

1211811993
-
12119-
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, mixed given\\.$#"
11994+
message: "#^Parameter \\#2 \\$specInBrackets of method PhpMyAdmin\\\\InsertEdit\\:\\:getColumnSize\\(\\) expects string, mixed given\\.$#"
1212011995
count: 1
1212111996
path: src/InsertEdit.php
1212211997

1212311998
-
12124-
message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:getDisplayField\\(\\) expects string, mixed given\\.$#"
11999+
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, mixed given\\.$#"
1212512000
count: 1
1212612001
path: src/InsertEdit.php
1212712002

1212812003
-
12129-
message: "#^Parameter \\#3 \\$row of static method PhpMyAdmin\\\\Util\\:\\:getUniqueCondition\\(\\) expects array\\<int, mixed\\>, mixed given\\.$#"
12004+
message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:getDisplayField\\(\\) expects string, mixed given\\.$#"
1213012005
count: 1
1213112006
path: src/InsertEdit.php
1213212007

@@ -19060,6 +18935,26 @@ parameters:
1906018935
count: 1
1906118936
path: src/Types.php
1906218937

18938+
-
18939+
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
18940+
count: 4
18941+
path: src/UniqueCondition.php
18942+
18943+
-
18944+
message: "#^Only booleans are allowed in &&, bool\\|string given on the left side\\.$#"
18945+
count: 1
18946+
path: src/UniqueCondition.php
18947+
18948+
-
18949+
message: "#^Parameter \\#1 \\$dbName of method PhpMyAdmin\\\\DatabaseInterface\\:\\:getTable\\(\\) expects string, mixed given\\.$#"
18950+
count: 1
18951+
path: src/UniqueCondition.php
18952+
18953+
-
18954+
message: "#^Parameter \\#1 \\$row of method PhpMyAdmin\\\\UniqueCondition\\:\\:getConditionValue\\(\\) expects float\\|int\\|string\\|null, mixed given\\.$#"
18955+
count: 1
18956+
path: src/UniqueCondition.php
18957+
1906318958
-
1906418959
message: "#^Call to function base64_decode\\(\\) requires parameter \\#2 to be set\\.$#"
1906518960
count: 1
@@ -19242,7 +19137,7 @@ parameters:
1924219137

1924319138
-
1924419139
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
19245-
count: 6
19140+
count: 2
1924619141
path: src/Util.php
1924719142

1924819143
-
@@ -19260,16 +19155,6 @@ parameters:
1926019155
count: 1
1926119156
path: src/Util.php
1926219157

19263-
-
19264-
message: "#^Method PhpMyAdmin\\\\Util\\:\\:getUniqueCondition\\(\\) return type has no value type specified in iterable type array\\.$#"
19265-
count: 1
19266-
path: src/Util.php
19267-
19268-
-
19269-
message: "#^Only booleans are allowed in &&, bool\\|string given on the left side\\.$#"
19270-
count: 1
19271-
path: src/Util.php
19272-
1927319158
-
1927419159
message: "#^Only booleans are allowed in &&, int\\|false given on the right side\\.$#"
1927519160
count: 1
@@ -19330,16 +19215,6 @@ parameters:
1933019215
count: 1
1933119216
path: src/Util.php
1933219217

19333-
-
19334-
message: "#^Parameter \\#1 \\$dbName of method PhpMyAdmin\\\\DatabaseInterface\\:\\:getTable\\(\\) expects string, mixed given\\.$#"
19335-
count: 1
19336-
path: src/Util.php
19337-
19338-
-
19339-
message: "#^Parameter \\#1 \\$row of static method PhpMyAdmin\\\\Util\\:\\:getConditionValue\\(\\) expects float\\|int\\|string\\|null, mixed given\\.$#"
19340-
count: 1
19341-
path: src/Util.php
19342-
1934319218
-
1934419219
message: "#^Parameter \\#1 \\$str of method PhpMyAdmin\\\\DatabaseInterface\\:\\:escapeMysqlWildcards\\(\\) expects string, mixed given\\.$#"
1934519220
count: 1

0 commit comments

Comments
 (0)