Make in_array strict
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
b658499250
commit
4fb335e960
@ -1115,11 +1115,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/ConfigStorage/Relation.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/ConfigStorage/Relation.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on mixed\\.$#"
|
||||
count: 1
|
||||
@ -1680,11 +1675,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/DataDictionaryController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Database/DesignerController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'dbName' on mixed\\.$#"
|
||||
count: 2
|
||||
@ -2060,11 +2050,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/MultiTableQueryController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Controllers/Database/RoutinesController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on mixed\\.$#"
|
||||
count: 6
|
||||
@ -2187,7 +2172,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$which of static method PhpMyAdmin\\\\Database\\\\Routines\\:\\:getDetails\\(\\) expects string\\|null, mixed given\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Controllers/Database/RoutinesController.php
|
||||
|
||||
-
|
||||
@ -2705,11 +2690,6 @@ parameters:
|
||||
count: 4
|
||||
path: src/Controllers/Database/StructureController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Controllers/Database/StructureController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'Check_time' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -3035,11 +3015,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Database/TrackingController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/ErrorReportController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'success' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -3065,11 +3040,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Export/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Export/ExportController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'aliases' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -3440,11 +3410,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Import/ImportController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Import/ImportController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'error' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -3552,7 +3517,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$path of static method PhpMyAdmin\\\\Core\\:\\:securePath\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Controllers/Import/ImportController.php
|
||||
|
||||
-
|
||||
@ -4580,11 +4545,6 @@ parameters:
|
||||
count: 4
|
||||
path: src/Controllers/Server/DatabasesController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Server/DatabasesController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'DEFAULT_COLLATION…' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -5055,11 +5015,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Server/Status/VariablesController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Server/Status/VariablesController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -5145,11 +5100,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Server/Variables/SetVariableController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Setup/AbstractController.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a ternary operator condition, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -6585,11 +6535,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Controllers/Table/ReplaceController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Table/ReplaceController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function method_exists\\(\\) with PhpMyAdmin\\\\Plugins\\\\IOTransformationsPlugin and 'isSuccess' will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
@ -6865,11 +6810,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Table/ReplaceController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: src/Controllers/Table/SearchController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset int on mixed\\.$#"
|
||||
count: 1
|
||||
@ -7855,11 +7795,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Controllers/Table/ZoomSearchController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: src/Controllers/Table/ZoomSearchController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 0 on mixed\\.$#"
|
||||
count: 3
|
||||
@ -8040,11 +7975,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/Transformation/WrapperController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Controllers/Triggers/IndexController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method isSuccess\\(\\) on mixed\\.$#"
|
||||
count: 1
|
||||
@ -8215,11 +8145,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Controllers/VersionCheckController.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: src/Controllers/View/CreateController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'back' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -8322,7 +8247,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 4
|
||||
count: 3
|
||||
path: src/Core.php
|
||||
|
||||
-
|
||||
@ -8395,11 +8320,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/CreateAddField.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/CreateAddField.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'col_index' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -8552,7 +8472,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 9
|
||||
count: 4
|
||||
path: src/Database/CentralColumns.php
|
||||
|
||||
-
|
||||
@ -8835,11 +8755,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Database/Designer/Common.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Database/Designer/Common.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'ENGINE' on mixed\\.$#"
|
||||
count: 5
|
||||
@ -9000,11 +8915,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Database/Events.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Database/Events.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on mixed\\.$#"
|
||||
count: 6
|
||||
@ -9090,11 +9000,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Database/Routines.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 5
|
||||
path: src/Database/Routines.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on mixed\\.$#"
|
||||
count: 9
|
||||
@ -9207,7 +9112,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 23
|
||||
count: 22
|
||||
path: src/Database/Routines.php
|
||||
|
||||
-
|
||||
@ -9355,11 +9260,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Database/Routines.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Database/Routines.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#7 \\$itemType of method PhpMyAdmin\\\\Database\\\\Routines\\:\\:processParamsAndBuild\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -9645,11 +9545,6 @@ parameters:
|
||||
count: 6
|
||||
path: src/Display/Results.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: src/Display/Results.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'display_binary' on mixed\\.$#"
|
||||
count: 8
|
||||
@ -10095,11 +9990,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Error.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'args' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -10267,7 +10157,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Export/Export.php
|
||||
|
||||
-
|
||||
@ -10915,11 +10805,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Gis/GisVisualization.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Git.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 1 on array\\|false\\.$#"
|
||||
count: 2
|
||||
@ -11087,7 +10972,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Html/Generator.php
|
||||
|
||||
-
|
||||
@ -11700,11 +11585,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/InsertEdit.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 7
|
||||
path: src/InsertEdit.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'relational_display' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -12015,11 +11895,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/IpAllowDeny.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Language.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'a_meta_dir' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -12150,11 +12025,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Menu.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 5
|
||||
path: src/Menu.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'icon' on mixed\\.$#"
|
||||
count: 22
|
||||
@ -12250,11 +12120,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Navigation/NavigationTree.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 12
|
||||
path: src/Navigation/NavigationTree.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'image' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -12435,11 +12300,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Navigation/Nodes/Node.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Navigation/Nodes/Node.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 5
|
||||
@ -12505,11 +12365,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Navigation/Nodes/NodeColumn.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Navigation/Nodes/NodeDatabase.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Navigation\\\\Nodes\\\\NodeDatabase\\:\\:getEventCount\\(\\) should return int but returns int\\|string\\.$#"
|
||||
count: 1
|
||||
@ -12557,7 +12412,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 7
|
||||
count: 1
|
||||
path: src/Normalization.php
|
||||
|
||||
-
|
||||
@ -13345,11 +13200,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Auth/AuthenticationHttp.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Plugins/Auth/AuthenticationSignon.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 2
|
||||
@ -13490,11 +13340,6 @@ parameters:
|
||||
count: 3
|
||||
path: src/Plugins/Export/ExportCsv.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Plugins/Export/ExportHtmlword.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'columns' on mixed\\.$#"
|
||||
count: 3
|
||||
@ -13545,11 +13390,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Export/ExportJson.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Plugins/Export/ExportLatex.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'columns' on mixed\\.$#"
|
||||
count: 2
|
||||
@ -14140,11 +13980,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Export/ExportSql.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Plugins/Export/ExportTexytext.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'columns' on mixed\\.$#"
|
||||
count: 3
|
||||
@ -15165,11 +15000,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_field' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -15177,7 +15007,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_table' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15192,7 +15022,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'ref_table_name' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15215,11 +15045,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$foreignTable of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Dia\\\\DiaRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Dia/DiaRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$foreignField of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Dia\\\\DiaRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
@ -15250,11 +15075,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_field' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -15262,7 +15082,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_table' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15277,7 +15097,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'ref_table_name' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15300,11 +15120,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#5 \\$foreignTable of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Eps\\\\EpsRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Eps/EpsRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#6 \\$foreignField of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Eps\\\\EpsRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
@ -15385,11 +15200,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Call to method TCPDF\\:\\:Line\\(\\) with incorrect case\\: line$#"
|
||||
count: 2
|
||||
@ -15427,7 +15237,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_table' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15442,7 +15252,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'ref_table_name' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15535,11 +15345,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#3 \\$foreignTable of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Pdf\\\\PdfRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Pdf/PdfRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#4 \\$foreignField of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Pdf\\\\PdfRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
@ -15615,11 +15420,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_field' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -15627,7 +15427,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'foreign_table' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15642,7 +15442,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'ref_table_name' on mixed\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
@ -15660,11 +15460,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#5 \\$foreignTable of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\SvgRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Plugins/Schema/Svg/SvgRelationSchema.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#6 \\$foreignField of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\SvgRelationSchema\\:\\:addRelation\\(\\) expects string, mixed given\\.$#"
|
||||
count: 2
|
||||
@ -15985,11 +15780,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Profiling.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Query/Compatibility.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'AUTO_INCREMENT' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -16425,11 +16215,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Replication/Replication.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Replication/ReplicationGui.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'Slave_IO_Running' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -16720,11 +16505,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Server/Privileges.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 17
|
||||
path: src/Server/Privileges.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'CHARACTER_MAXIMUM…' on mixed\\.$#"
|
||||
count: 2
|
||||
@ -17895,11 +17675,6 @@ parameters:
|
||||
count: 4
|
||||
path: src/SystemDatabase.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Table/ColumnsDefinition.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'isEditable' on mixed\\.$#"
|
||||
count: 2
|
||||
@ -18050,11 +17825,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Table/Search.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Table/Search.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset mixed on mixed\\.$#"
|
||||
count: 4
|
||||
@ -18142,7 +17912,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 5
|
||||
count: 3
|
||||
path: src/Table/Table.php
|
||||
|
||||
-
|
||||
@ -18740,11 +18510,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Triggers/Triggers.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: src/Triggers/Triggers.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access an offset on mixed\\.$#"
|
||||
count: 6
|
||||
@ -18787,7 +18552,7 @@ parameters:
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$identifier of static method PhpMyAdmin\\\\Util\\:\\:backquote\\(\\) expects string\\|Stringable\\|null, mixed given\\.$#"
|
||||
count: 4
|
||||
count: 3
|
||||
path: src/Triggers/Triggers.php
|
||||
|
||||
-
|
||||
@ -18815,21 +18580,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Triggers/Triggers.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: src/TwoFactor.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$name of method PhpMyAdmin\\\\TwoFactor\\:\\:getBackendClass\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/TwoFactor.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 1
|
||||
path: src/Types.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 4
|
||||
@ -18965,11 +18715,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Util.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 5
|
||||
path: src/Util.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'Cardinality' on mixed\\.$#"
|
||||
count: 1
|
||||
@ -19330,11 +19075,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/ZipExtension.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 2
|
||||
path: tests/classes/AbstractTestCase.php
|
||||
|
||||
-
|
||||
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) with 'formula' and array\\{id\\: non\\-empty\\-string, name\\: string, precondition\\?\\: non\\-empty\\-string, formula\\: non\\-empty\\-string, test\\: non\\-empty\\-string, issue\\: string, recommendation\\: string, justification\\: string, \\.\\.\\.\\} will always evaluate to true\\.$#"
|
||||
count: 1
|
||||
@ -21070,11 +20810,6 @@ parameters:
|
||||
count: 1
|
||||
path: tests/classes/Triggers/TriggersTest.php
|
||||
|
||||
-
|
||||
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
|
||||
count: 3
|
||||
path: tests/classes/TwoFactorTest.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Tests\\\\TwoFactorTest\\:\\:loadResultForConfig\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -1243,7 +1243,6 @@
|
||||
<code><![CDATA[$_POST['item_type']]]></code>
|
||||
<code><![CDATA[$_POST['item_type']]]></code>
|
||||
<code><![CDATA[$_REQUEST['item_name']]]></code>
|
||||
<code>$type</code>
|
||||
</PossiblyInvalidArgument>
|
||||
<PossiblyInvalidCast>
|
||||
<code><![CDATA[$_GET['item_name']]]></code>
|
||||
@ -2079,7 +2078,6 @@
|
||||
<code><![CDATA[$GLOBALS['timestamp']]]></code>
|
||||
</InvalidArrayOffset>
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$GLOBALS['format']]]></code>
|
||||
<code><![CDATA[$GLOBALS['import_file']]]></code>
|
||||
<code><![CDATA[$GLOBALS['import_file']]]></code>
|
||||
<code><![CDATA[$GLOBALS['import_notice']]]></code>
|
||||
@ -2154,7 +2152,6 @@
|
||||
</MixedMethodCall>
|
||||
<MixedOperand>
|
||||
<code><![CDATA[$GLOBALS['charset_of_file']]]></code>
|
||||
<code><![CDATA[$GLOBALS['format']]]></code>
|
||||
<code><![CDATA[$GLOBALS['local_import_file']]]></code>
|
||||
</MixedOperand>
|
||||
<PossiblyInvalidArgument>
|
||||
@ -3828,7 +3825,6 @@
|
||||
<code><![CDATA[$GLOBALS['query']]]></code>
|
||||
<code><![CDATA[$GLOBALS['unsaved_values']]]></code>
|
||||
<code><![CDATA[$GLOBALS['unsaved_values'][$rowNumber]]]></code>
|
||||
<code><![CDATA[$GLOBALS['urlParams']['after_insert']]]></code>
|
||||
<code><![CDATA[$GLOBALS['urlParams']['where_clause'][]]]></code>
|
||||
<code>$afterInsert</code>
|
||||
<code>$clauseIsUnique</code>
|
||||
@ -4418,11 +4414,8 @@
|
||||
<code><![CDATA[$viewData['with']]]></code>
|
||||
</MixedAssignment>
|
||||
<MixedOperand>
|
||||
<code><![CDATA[$view['algorithm']]]></code>
|
||||
<code><![CDATA[$view['as']]]></code>
|
||||
<code><![CDATA[$view['column_names']]]></code>
|
||||
<code><![CDATA[$view['sql_security']]]></code>
|
||||
<code><![CDATA[$view['with']]]></code>
|
||||
</MixedOperand>
|
||||
<PossiblyUnusedMethod>
|
||||
<code>__construct</code>
|
||||
@ -4540,7 +4533,6 @@
|
||||
</MixedAssignment>
|
||||
<MixedOperand>
|
||||
<code><![CDATA[$column['size']]]></code>
|
||||
<code><![CDATA[$index['Index_type']]]></code>
|
||||
<code><![CDATA[$partition['comment']]]></code>
|
||||
<code><![CDATA[$partition['data_directory']]]></code>
|
||||
<code><![CDATA[$partition['engine']]]></code>
|
||||
@ -5034,7 +5026,6 @@
|
||||
</PossiblyInvalidCast>
|
||||
<PossiblyInvalidOperand>
|
||||
<code><![CDATA[$_POST['item_definition']]]></code>
|
||||
<code><![CDATA[$_POST['item_interval_field']]]></code>
|
||||
</PossiblyInvalidOperand>
|
||||
<PossiblyNullArgument>
|
||||
<code>$createItem</code>
|
||||
@ -5247,7 +5238,6 @@
|
||||
<code><![CDATA[$_POST['item_returnlength']]]></code>
|
||||
<code><![CDATA[$_POST['item_type']]]></code>
|
||||
<code>$itemDefinition</code>
|
||||
<code>$itemSqlDataAccess</code>
|
||||
</PossiblyInvalidOperand>
|
||||
<PossiblyNullArgument>
|
||||
<code>$createRoutine</code>
|
||||
@ -7478,9 +7468,6 @@
|
||||
<code>int</code>
|
||||
<code>int</code>
|
||||
</InvalidReturnType>
|
||||
<MixedAssignment>
|
||||
<code>$item</code>
|
||||
</MixedAssignment>
|
||||
</file>
|
||||
<file src="src/Navigation/Nodes/NodeDatabaseChild.php">
|
||||
<PossiblyInvalidPropertyFetch>
|
||||
@ -12346,15 +12333,12 @@
|
||||
<code><![CDATA[$_POST['item_name']]]></code>
|
||||
<code><![CDATA[$_POST['item_name']]]></code>
|
||||
<code><![CDATA[$_POST['item_original_name']]]></code>
|
||||
<code><![CDATA[$_POST['item_table']]]></code>
|
||||
</PossiblyInvalidArgument>
|
||||
<PossiblyInvalidCast>
|
||||
<code><![CDATA[$_POST['item_original_name']]]></code>
|
||||
</PossiblyInvalidCast>
|
||||
<PossiblyInvalidOperand>
|
||||
<code><![CDATA[$_POST['item_definition']]]></code>
|
||||
<code><![CDATA[$_POST['item_event']]]></code>
|
||||
<code><![CDATA[$_POST['item_timing']]]></code>
|
||||
</PossiblyInvalidOperand>
|
||||
<PossiblyNullReference>
|
||||
<code>getCreateSql</code>
|
||||
@ -12368,12 +12352,6 @@
|
||||
<code>Config::getInstance()</code>
|
||||
<code>DatabaseInterface::getInstance()</code>
|
||||
</DeprecatedMethod>
|
||||
<MixedArgument>
|
||||
<code>$name</code>
|
||||
</MixedArgument>
|
||||
<MixedAssignment>
|
||||
<code>$name</code>
|
||||
</MixedAssignment>
|
||||
<UnsafeInstantiation>
|
||||
<code>new $cls($this)</code>
|
||||
<code>new $cls($this)</code>
|
||||
|
||||
@ -1519,7 +1519,7 @@ class Relation
|
||||
// Check if the table already exists
|
||||
// use the possible replaced name first and fallback on the table name
|
||||
// if no replacement exists
|
||||
if (! in_array($tableNameReplacements[$table] ?? $table, $existingTables)) {
|
||||
if (! in_array($tableNameReplacements[$table] ?? $table, $existingTables, true)) {
|
||||
if (! $create) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ class DesignerController extends AbstractController
|
||||
}
|
||||
|
||||
foreach ($tablePositions as $position) {
|
||||
if (in_array($position['dbName'] . '.' . $position['tableName'], $fullTableNames)) {
|
||||
if (in_array($position['dbName'] . '.' . $position['tableName'], $fullTableNames, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,10 @@ class RoutinesController extends AbstractController
|
||||
/**
|
||||
* Displays the header and tabs
|
||||
*/
|
||||
if (! empty($GLOBALS['table']) && in_array($GLOBALS['table'], $this->dbi->getTables($GLOBALS['db']))) {
|
||||
if (
|
||||
! empty($GLOBALS['table'])
|
||||
&& in_array($GLOBALS['table'], $this->dbi->getTables($GLOBALS['db']), true)
|
||||
) {
|
||||
if (! $this->checkParameters(['db', 'table'])) {
|
||||
return;
|
||||
}
|
||||
@ -452,7 +455,7 @@ class RoutinesController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
if (! isset($type) || ! in_array($type, ['FUNCTION', 'PROCEDURE'])) {
|
||||
if (! isset($type) || ! in_array($type, ['FUNCTION', 'PROCEDURE'], true)) {
|
||||
$type = null;
|
||||
}
|
||||
|
||||
|
||||
@ -557,7 +557,7 @@ class StructureController extends AbstractController
|
||||
if (isset($currentTable['TABLE_ROWS']) && ($currentTable['ENGINE'] != null || $tableIsView)) {
|
||||
// InnoDB/TokuDB table: we did not get an accurate row count
|
||||
$approxRows = ! $tableIsView
|
||||
&& in_array($currentTable['ENGINE'], ['InnoDB', 'TokuDB'])
|
||||
&& in_array($currentTable['ENGINE'], ['InnoDB', 'TokuDB'], true)
|
||||
&& ! $currentTable['COUNTED'];
|
||||
|
||||
if ($tableIsView && $currentTable['TABLE_ROWS'] >= Config::getInstance()->settings['MaxExactCountViews']) {
|
||||
@ -828,7 +828,7 @@ class StructureController extends AbstractController
|
||||
$formattedSize = $unit = '';
|
||||
|
||||
if (
|
||||
(in_array($currentTable['ENGINE'], ['InnoDB', 'TokuDB'])
|
||||
(in_array($currentTable['ENGINE'], ['InnoDB', 'TokuDB'], true)
|
||||
&& $currentTable['TABLE_ROWS'] < Config::getInstance()->settings['MaxExactCount'])
|
||||
|| ! isset($currentTable['TABLE_ROWS'])
|
||||
) {
|
||||
|
||||
@ -48,7 +48,7 @@ class ErrorReportController extends AbstractController
|
||||
/** @var string|null $alwaysSend */
|
||||
$alwaysSend = $request->getParsedBodyParam('always_send');
|
||||
|
||||
if (! in_array($exceptionType, ['js', 'php'])) {
|
||||
if (! in_array($exceptionType, ['js', 'php'], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ final class ExportController extends AbstractController
|
||||
$separateFiles = $asSeparateFiles;
|
||||
}
|
||||
|
||||
if (in_array($compressionParam, $compressionMethods)) {
|
||||
if (in_array($compressionParam, $compressionMethods, true)) {
|
||||
$GLOBALS['compression'] = $compressionParam;
|
||||
$GLOBALS['buffer_needed'] = true;
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ final class ImportController extends AbstractController
|
||||
* We only need to load the selected plugin
|
||||
*/
|
||||
|
||||
if (! in_array($GLOBALS['format'], ['csv', 'ldi', 'mediawiki', 'ods', 'shp', 'sql', 'xml'])) {
|
||||
if (! in_array($GLOBALS['format'], ['csv', 'ldi', 'mediawiki', 'ods', 'shp', 'sql', 'xml'], true)) {
|
||||
// this should not happen for a normal user
|
||||
// but only during an attack
|
||||
$this->response->setRequestStatus(false);
|
||||
|
||||
@ -182,7 +182,7 @@ class DatabasesController extends AbstractController
|
||||
'SCHEMA_DATA_FREE',
|
||||
];
|
||||
$this->sortBy = 'SCHEMA_NAME';
|
||||
if (in_array($sortBy, $sortByAllowList)) {
|
||||
if (in_array($sortBy, $sortByAllowList, true)) {
|
||||
$this->sortBy = $sortBy;
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,9 +136,7 @@ class VariablesController extends AbstractController
|
||||
*/
|
||||
private function flush(string $flush): void
|
||||
{
|
||||
$flushCommands = ['STATUS', 'TABLES', 'QUERY CACHE'];
|
||||
|
||||
if (! in_array($flush, $flushCommands)) {
|
||||
if (! in_array($flush, ['STATUS', 'TABLES', 'QUERY CACHE'], true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ abstract class AbstractController
|
||||
$ignored = ['Config', 'Servers'];
|
||||
$pages = [];
|
||||
foreach (SetupFormList::getAllFormNames() as $formset) {
|
||||
if (in_array($formset, $ignored)) {
|
||||
if (in_array($formset, $ignored, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -76,9 +76,8 @@ final class ReplaceController extends AbstractController
|
||||
|
||||
$this->addScriptFiles(['makegrid.js', 'sql.js', 'gis_data_editor.js']);
|
||||
|
||||
$afterInsertActions = ['new_insert', 'same_insert', 'edit_next'];
|
||||
$afterInsert = $request->getParsedBodyParam('after_insert');
|
||||
if ($afterInsert !== null && in_array($afterInsert, $afterInsertActions)) {
|
||||
if (in_array($afterInsert, ['new_insert', 'same_insert', 'edit_next'], true)) {
|
||||
$GLOBALS['urlParams']['after_insert'] = $afterInsert;
|
||||
$whereClause = $request->getParsedBodyParam('where_clause');
|
||||
if ($whereClause !== null) {
|
||||
|
||||
@ -120,7 +120,7 @@ class SearchController extends AbstractController
|
||||
// before any replacement
|
||||
$this->originalColumnTypes[] = mb_strtolower($type);
|
||||
// check whether table contains geometric columns
|
||||
if (in_array($type, $geomTypes)) {
|
||||
if (in_array($type, $geomTypes, true)) {
|
||||
$this->geomColumnFlag = true;
|
||||
}
|
||||
|
||||
@ -378,8 +378,8 @@ class SearchController extends AbstractController
|
||||
'',
|
||||
);
|
||||
$htmlAttributes = '';
|
||||
$isInteger = in_array($cleanType, $this->dbi->types->getIntegerTypes());
|
||||
$isFloat = in_array($cleanType, $this->dbi->types->getFloatTypes());
|
||||
$isInteger = in_array($cleanType, $this->dbi->types->getIntegerTypes(), true);
|
||||
$isFloat = in_array($cleanType, $this->dbi->types->getFloatTypes(), true);
|
||||
if ($isInteger) {
|
||||
$extractedColumnspec = Util::extractColumnSpec($this->originalColumnTypes[$columnIndex]);
|
||||
$isUnsigned = $extractedColumnspec['unsigned'];
|
||||
|
||||
@ -206,7 +206,7 @@ class ZoomSearchController extends AbstractController
|
||||
// before any replacement
|
||||
$this->originalColumnTypes[] = mb_strtolower($type);
|
||||
// check whether table contains geometric columns
|
||||
if (in_array($type, $geomTypes)) {
|
||||
if (in_array($type, $geomTypes, true)) {
|
||||
$this->geomColumnFlag = true;
|
||||
}
|
||||
|
||||
@ -465,8 +465,8 @@ class ZoomSearchController extends AbstractController
|
||||
'',
|
||||
);
|
||||
$htmlAttributes = '';
|
||||
$isInteger = in_array($cleanType, $this->dbi->types->getIntegerTypes());
|
||||
$isFloat = in_array($cleanType, $this->dbi->types->getFloatTypes());
|
||||
$isInteger = in_array($cleanType, $this->dbi->types->getIntegerTypes(), true);
|
||||
$isFloat = in_array($cleanType, $this->dbi->types->getFloatTypes(), true);
|
||||
if ($isInteger) {
|
||||
$extractedColumnspec = Util::extractColumnSpec($this->originalColumnTypes[$columnIndex]);
|
||||
$isUnsigned = $extractedColumnspec['unsigned'];
|
||||
|
||||
@ -57,7 +57,10 @@ final class IndexController extends AbstractController
|
||||
/**
|
||||
* Displays the header and tabs
|
||||
*/
|
||||
if (! empty($GLOBALS['table']) && in_array($GLOBALS['table'], $this->dbi->getTables($GLOBALS['db']))) {
|
||||
if (
|
||||
! empty($GLOBALS['table'])
|
||||
&& in_array($GLOBALS['table'], $this->dbi->getTables($GLOBALS['db']), true)
|
||||
) {
|
||||
if (! $this->checkParameters(['db', 'table'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ class CreateController extends AbstractController
|
||||
|
||||
if (
|
||||
isset($view['algorithm'])
|
||||
&& in_array($view['algorithm'], self::VIEW_ALGORITHM_OPTIONS)
|
||||
&& in_array($view['algorithm'], self::VIEW_ALGORITHM_OPTIONS, true)
|
||||
) {
|
||||
$sqlQuery .= $separator . ' ALGORITHM = ' . $view['algorithm'];
|
||||
}
|
||||
@ -283,7 +283,7 @@ class CreateController extends AbstractController
|
||||
|
||||
if (
|
||||
isset($view['sql_security'])
|
||||
&& in_array($view['sql_security'], self::VIEW_SECURITY_OPTIONS)
|
||||
&& in_array($view['sql_security'], self::VIEW_SECURITY_OPTIONS, true)
|
||||
) {
|
||||
$sqlQuery .= $separator . ' SQL SECURITY '
|
||||
. $view['sql_security'];
|
||||
@ -298,7 +298,7 @@ class CreateController extends AbstractController
|
||||
|
||||
$sqlQuery .= $separator . ' AS ' . $view['as'];
|
||||
|
||||
if (isset($view['with']) && in_array($view['with'], self::VIEW_WITH_OPTIONS)) {
|
||||
if (isset($view['with']) && in_array($view['with'], self::VIEW_WITH_OPTIONS, true)) {
|
||||
$sqlQuery .= $separator . ' WITH ' . $view['with'] . ' CHECK OPTION';
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ class Core
|
||||
$phpDocLanguages = ['pt_BR', 'zh_CN', 'fr', 'de', 'ja', 'ru', 'es', 'tr'];
|
||||
|
||||
$lang = 'en';
|
||||
if (isset($GLOBALS['lang']) && in_array($GLOBALS['lang'], $phpDocLanguages)) {
|
||||
if (isset($GLOBALS['lang']) && in_array($GLOBALS['lang'], $phpDocLanguages, true)) {
|
||||
$lang = $GLOBALS['lang'] === 'zh_CN' ? 'zh' : $GLOBALS['lang'];
|
||||
}
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ class CreateAddField
|
||||
if (
|
||||
$index['Index_choice'] !== 'SPATIAL'
|
||||
&& $index['Index_choice'] !== 'FULLTEXT'
|
||||
&& in_array($index['Index_type'], Index::getIndexTypes())
|
||||
&& in_array($index['Index_type'], Index::getIndexTypes(), true)
|
||||
) {
|
||||
$sqlQuery .= ' USING ' . $index['Index_type'];
|
||||
}
|
||||
|
||||
@ -752,19 +752,19 @@ class CentralColumns
|
||||
foreach ($columnsList as &$row) {
|
||||
$vals = explode(',', $row['col_extra']);
|
||||
|
||||
if (in_array('BINARY', $vals)) {
|
||||
if (in_array('BINARY', $vals, true)) {
|
||||
$row['col_attribute'] = 'BINARY';
|
||||
} elseif (in_array('UNSIGNED', $vals)) {
|
||||
} elseif (in_array('UNSIGNED', $vals, true)) {
|
||||
$row['col_attribute'] = 'UNSIGNED';
|
||||
} elseif (in_array('UNSIGNED ZEROFILL', $vals)) {
|
||||
} elseif (in_array('UNSIGNED ZEROFILL', $vals, true)) {
|
||||
$row['col_attribute'] = 'UNSIGNED ZEROFILL';
|
||||
} elseif (in_array('on update CURRENT_TIMESTAMP', $vals)) {
|
||||
} elseif (in_array('on update CURRENT_TIMESTAMP', $vals, true)) {
|
||||
$row['col_attribute'] = 'on update CURRENT_TIMESTAMP';
|
||||
} else {
|
||||
$row['col_attribute'] = '';
|
||||
}
|
||||
|
||||
$row['col_extra'] = in_array('auto_increment', $vals) ? 'auto_increment' : '';
|
||||
$row['col_extra'] = in_array('auto_increment', $vals, true) ? 'auto_increment' : '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ class Common
|
||||
$dtnI = $con['DTN'][$i];
|
||||
$retval[$ti] = [];
|
||||
$retval[$ti][$cNameI] = [];
|
||||
if (in_array($dtnI, $tableDbNames) && in_array($con['STN'][$i], $tableDbNames)) {
|
||||
if (in_array($dtnI, $tableDbNames, true) && in_array($con['STN'][$i], $tableDbNames, true)) {
|
||||
$retval[$ti][$cNameI][$dtnI] = [];
|
||||
$retval[$ti][$cNameI][$dtnI][$con['DCN'][$i]] = [0 => $con['STN'][$i], 1 => $con['SCN'][$i]];
|
||||
}
|
||||
|
||||
@ -269,12 +269,12 @@ class Events
|
||||
}
|
||||
|
||||
$query .= 'ON SCHEDULE ';
|
||||
if (! empty($_POST['item_type']) && in_array($_POST['item_type'], $this->type)) {
|
||||
if (! empty($_POST['item_type']) && in_array($_POST['item_type'], $this->type, true)) {
|
||||
if ($_POST['item_type'] === 'RECURRING') {
|
||||
if (
|
||||
! empty($_POST['item_interval_value'])
|
||||
&& ! empty($_POST['item_interval_field'])
|
||||
&& in_array($_POST['item_interval_field'], $this->interval)
|
||||
&& in_array($_POST['item_interval_field'], $this->interval, true)
|
||||
) {
|
||||
$query .= 'EVERY ' . intval($_POST['item_interval_value']) . ' ';
|
||||
$query .= $_POST['item_interval_field'] . ' ';
|
||||
|
||||
@ -603,7 +603,7 @@ class Routines
|
||||
if (
|
||||
$itemType === 'PROCEDURE'
|
||||
&& ! empty($itemParamDir[$i])
|
||||
&& in_array($itemParamDir[$i], $this->directions)
|
||||
&& in_array($itemParamDir[$i], $this->directions, true)
|
||||
) {
|
||||
$params .= $itemParamDir[$i] . ' '
|
||||
. Util::backquote($itemParamName[$i])
|
||||
@ -642,7 +642,7 @@ class Routines
|
||||
|
||||
if (! empty($itemParamOpsText[$i])) {
|
||||
if ($this->dbi->types->getTypeClass($itemParamType[$i]) === 'CHAR') {
|
||||
if (! in_array($itemParamType[$i], ['VARBINARY', 'BINARY'])) {
|
||||
if (! in_array($itemParamType[$i], ['VARBINARY', 'BINARY'], true)) {
|
||||
$params .= ' CHARSET '
|
||||
. mb_strtolower($itemParamOpsText[$i]);
|
||||
}
|
||||
@ -820,7 +820,7 @@ class Routines
|
||||
}
|
||||
|
||||
$itemSqlDataAccess = $_POST['item_sqldataaccess'] ?? '';
|
||||
if (! empty($itemSqlDataAccess) && in_array($itemSqlDataAccess, $this->sqlDataAccess)) {
|
||||
if (in_array($itemSqlDataAccess, $this->sqlDataAccess, true)) {
|
||||
$query .= $itemSqlDataAccess . ' ';
|
||||
}
|
||||
|
||||
@ -861,7 +861,7 @@ class Routines
|
||||
|
||||
if (
|
||||
! empty($_POST['funcs'][$routine['item_param_name'][$i]])
|
||||
&& in_array($_POST['funcs'][$routine['item_param_name'][$i]], $allFunctions)
|
||||
&& in_array($_POST['funcs'][$routine['item_param_name'][$i]], $allFunctions, true)
|
||||
) {
|
||||
$queries[] = sprintf(
|
||||
'SET @p%d=%s(%s);',
|
||||
@ -1078,7 +1078,7 @@ class Routines
|
||||
$params[$i]['class'] = 'datefield';
|
||||
}
|
||||
|
||||
if (in_array($routine['item_param_type'][$i], ['ENUM', 'SET'])) {
|
||||
if (in_array($routine['item_param_type'][$i], ['ENUM', 'SET'], true)) {
|
||||
if ($routine['item_param_type'][$i] === 'ENUM') {
|
||||
$params[$i]['input_type'] = 'radio';
|
||||
} else {
|
||||
|
||||
@ -3058,6 +3058,7 @@ class Results
|
||||
isset($_REQUEST['pftext']) && in_array(
|
||||
$_REQUEST['pftext'],
|
||||
[self::DISPLAY_PARTIAL_TEXT, self::DISPLAY_FULL_TEXT],
|
||||
true,
|
||||
)
|
||||
) {
|
||||
$query['pftext'] = $_REQUEST['pftext'];
|
||||
@ -3072,6 +3073,7 @@ class Results
|
||||
isset($_REQUEST['relational_display']) && in_array(
|
||||
$_REQUEST['relational_display'],
|
||||
[self::RELATIONAL_KEY, self::RELATIONAL_DISPLAY_COLUMN],
|
||||
true,
|
||||
)
|
||||
) {
|
||||
$query['relational_display'] = $_REQUEST['relational_display'];
|
||||
@ -3087,6 +3089,7 @@ class Results
|
||||
isset($_REQUEST['geoOption']) && in_array(
|
||||
$_REQUEST['geoOption'],
|
||||
[self::GEOMETRY_DISP_WKT, self::GEOMETRY_DISP_WKB, self::GEOMETRY_DISP_GEOM],
|
||||
true,
|
||||
)
|
||||
) {
|
||||
$query['geoOption'] = $_REQUEST['geoOption'];
|
||||
|
||||
@ -408,9 +408,9 @@ class Error extends Message
|
||||
'_realConnect',
|
||||
];
|
||||
|
||||
if (in_array($function, $includeFunctions)) {
|
||||
if (in_array($function, $includeFunctions, true)) {
|
||||
$retval .= self::relPath($arg);
|
||||
} elseif (in_array($function, $connectFunctions) && is_string($arg)) {
|
||||
} elseif (in_array($function, $connectFunctions, true) && is_string($arg)) {
|
||||
$retval .= gettype($arg) . ' ********';
|
||||
} elseif (is_scalar($arg)) {
|
||||
$retval .= gettype($arg) . ' '
|
||||
|
||||
@ -98,7 +98,7 @@ class Export
|
||||
/** @var string[] $handlers */
|
||||
$handlers = ob_list_handlers();
|
||||
|
||||
return in_array('ob_gzhandler', $handlers);
|
||||
return in_array('ob_gzhandler', $handlers, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -367,7 +367,7 @@ class Git
|
||||
$dataline = array_shift($commit);
|
||||
$datalinearr = explode(' ', $dataline, 2);
|
||||
$linetype = $datalinearr[0];
|
||||
if (! in_array($linetype, ['author', 'committer'])) {
|
||||
if (! in_array($linetype, ['author', 'committer'], true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ class Git
|
||||
|
||||
if ($linetype === 'author') {
|
||||
$author = $user2;
|
||||
} elseif ($linetype === 'committer') {
|
||||
} else {
|
||||
$committer = $user2;
|
||||
}
|
||||
} while ($dataline != '');
|
||||
|
||||
@ -908,7 +908,7 @@ class Generator
|
||||
// set all other attributes
|
||||
$attributeString = '';
|
||||
foreach ($attributes as $key => $value) {
|
||||
if (in_array($key, ['alt', 'title'])) {
|
||||
if (in_array($key, ['alt', 'title'], true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ class InsertEdit
|
||||
}
|
||||
|
||||
$inputMinMax = '';
|
||||
$isInteger = in_array($column->trueType, $this->dbi->types->getIntegerTypes());
|
||||
$isInteger = in_array($column->trueType, $this->dbi->types->getIntegerTypes(), true);
|
||||
if ($isInteger) {
|
||||
$extractedColumnspec = Util::extractColumnSpec($column->type);
|
||||
$isUnsigned = $extractedColumnspec['unsigned'];
|
||||
@ -877,7 +877,7 @@ class InsertEdit
|
||||
public function getGotoInclude(string|false $gotoInclude): string
|
||||
{
|
||||
$validOptions = ['new_insert', 'same_insert', 'edit_next'];
|
||||
if (isset($_POST['after_insert']) && in_array($_POST['after_insert'], $validOptions)) {
|
||||
if (isset($_POST['after_insert']) && in_array($_POST['after_insert'], $validOptions, true)) {
|
||||
return '/table/change';
|
||||
}
|
||||
|
||||
@ -1168,8 +1168,8 @@ class InsertEdit
|
||||
}
|
||||
|
||||
if (
|
||||
in_array($editField->function, $this->getGisFromTextFunctions())
|
||||
|| in_array($editField->function, $this->getGisFromWKBFunctions())
|
||||
in_array($editField->function, $this->getGisFromTextFunctions(), true)
|
||||
|| in_array($editField->function, $this->getGisFromWKBFunctions(), true)
|
||||
) {
|
||||
preg_match('/^(\'?)(.*?)\1(?:,(\d+))?$/', $editField->value, $matches);
|
||||
$escapedParams = $this->dbi->quoteString($matches[2]) . (isset($matches[3]) ? ',' . $matches[3] : '');
|
||||
@ -1178,8 +1178,8 @@ class InsertEdit
|
||||
}
|
||||
|
||||
if (
|
||||
! in_array($editField->function, self::FUNC_NO_PARAM)
|
||||
|| ($editField->value !== '' && in_array($editField->function, self::FUNC_OPTIONAL_PARAM))
|
||||
! in_array($editField->function, self::FUNC_NO_PARAM, true)
|
||||
|| ($editField->value !== '' && in_array($editField->function, self::FUNC_OPTIONAL_PARAM, true))
|
||||
) {
|
||||
if (
|
||||
($editField->salt !== null
|
||||
@ -1956,7 +1956,7 @@ class InsertEdit
|
||||
}
|
||||
|
||||
$virtual = ['VIRTUAL', 'PERSISTENT', 'VIRTUAL GENERATED', 'STORED GENERATED'];
|
||||
if (in_array($tableColumn->extra, $virtual)) {
|
||||
if (in_array($tableColumn->extra, $virtual, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -144,7 +144,7 @@ class Language
|
||||
*/
|
||||
public function isRTL(): bool
|
||||
{
|
||||
return in_array($this->code, ['ar', 'fa', 'he', 'ur']);
|
||||
return in_array($this->code, ['ar', 'fa', 'he', 'ur'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
14
src/Menu.php
14
src/Menu.php
@ -224,7 +224,7 @@ class Menu
|
||||
$tabs['structure']['icon'] = 'b_props';
|
||||
$tabs['structure']['route'] = '/table/structure';
|
||||
$tabs['structure']['text'] = __('Structure');
|
||||
$tabs['structure']['active'] = in_array($route, ['/table/relation', '/table/structure']);
|
||||
$tabs['structure']['active'] = in_array($route, ['/table/relation', '/table/structure'], true);
|
||||
|
||||
$tabs['sql']['icon'] = 'b_sql';
|
||||
$tabs['sql']['route'] = '/table/sql';
|
||||
@ -234,7 +234,11 @@ class Menu
|
||||
$tabs['search']['icon'] = 'b_search';
|
||||
$tabs['search']['text'] = __('Search');
|
||||
$tabs['search']['route'] = '/table/search';
|
||||
$tabs['search']['active'] = in_array($route, ['/table/find-replace', '/table/search', '/table/zoom-search']);
|
||||
$tabs['search']['active'] = in_array($route, [
|
||||
'/table/find-replace',
|
||||
'/table/search',
|
||||
'/table/zoom-search',
|
||||
], true);
|
||||
|
||||
if (! $isSystemSchema && (! $tableIsView || $updatableView)) {
|
||||
$tabs['insert']['icon'] = 'b_insrow';
|
||||
@ -459,13 +463,13 @@ class Menu
|
||||
'/server/status/processes',
|
||||
'/server/status/queries',
|
||||
'/server/status/variables',
|
||||
]);
|
||||
], true);
|
||||
|
||||
if ($isSuperUser || $isCreateOrGrantUser) {
|
||||
$tabs['rights']['icon'] = 's_rights';
|
||||
$tabs['rights']['route'] = '/server/privileges';
|
||||
$tabs['rights']['text'] = __('User accounts');
|
||||
$tabs['rights']['active'] = in_array($route, ['/server/privileges', '/server/user-groups']);
|
||||
$tabs['rights']['active'] = in_array($route, ['/server/privileges', '/server/user-groups'], true);
|
||||
}
|
||||
|
||||
$tabs['export']['icon'] = 'b_export';
|
||||
@ -490,7 +494,7 @@ class Menu
|
||||
'/preferences/navigation',
|
||||
'/preferences/sql',
|
||||
'/preferences/two-factor',
|
||||
]);
|
||||
], true);
|
||||
|
||||
if (! empty($binaryLogs)) {
|
||||
$tabs['binlog']['icon'] = 's_tbl';
|
||||
|
||||
@ -552,45 +552,45 @@ class NavigationTree
|
||||
// Get items to hide
|
||||
$hidden = $db->getHiddenItems($this->relationParameters, 'group');
|
||||
$config = Config::getInstance();
|
||||
if (! $config->settings['NavigationTreeShowTables'] && ! in_array('tables', $hidden)) {
|
||||
if (! $config->settings['NavigationTreeShowTables'] && ! in_array('tables', $hidden, true)) {
|
||||
$hidden[] = 'tables';
|
||||
}
|
||||
|
||||
if (! $config->settings['NavigationTreeShowViews'] && ! in_array('views', $hidden)) {
|
||||
if (! $config->settings['NavigationTreeShowViews'] && ! in_array('views', $hidden, true)) {
|
||||
$hidden[] = 'views';
|
||||
}
|
||||
|
||||
if (! $config->settings['NavigationTreeShowFunctions'] && ! in_array('functions', $hidden)) {
|
||||
if (! $config->settings['NavigationTreeShowFunctions'] && ! in_array('functions', $hidden, true)) {
|
||||
$hidden[] = 'functions';
|
||||
}
|
||||
|
||||
if (! $config->settings['NavigationTreeShowProcedures'] && ! in_array('procedures', $hidden)) {
|
||||
if (! $config->settings['NavigationTreeShowProcedures'] && ! in_array('procedures', $hidden, true)) {
|
||||
$hidden[] = 'procedures';
|
||||
}
|
||||
|
||||
if (! $config->settings['NavigationTreeShowEvents'] && ! in_array('events', $hidden)) {
|
||||
if (! $config->settings['NavigationTreeShowEvents'] && ! in_array('events', $hidden, true)) {
|
||||
$hidden[] = 'events';
|
||||
}
|
||||
|
||||
$retval = [];
|
||||
if (! $db->hasChildren()) {
|
||||
if (! in_array('tables', $hidden) && $db->getPresence('tables')) {
|
||||
if (! in_array('tables', $hidden, true) && $db->getPresence('tables')) {
|
||||
$retval['tables'] = new NodeTableContainer();
|
||||
}
|
||||
|
||||
if (! in_array('views', $hidden) && $db->getPresence('views')) {
|
||||
if (! in_array('views', $hidden, true) && $db->getPresence('views')) {
|
||||
$retval['views'] = new NodeViewContainer();
|
||||
}
|
||||
|
||||
if (! in_array('functions', $hidden) && $db->getPresence('functions')) {
|
||||
if (! in_array('functions', $hidden, true) && $db->getPresence('functions')) {
|
||||
$retval['functions'] = new NodeFunctionContainer();
|
||||
}
|
||||
|
||||
if (! in_array('procedures', $hidden) && $db->getPresence('procedures')) {
|
||||
if (! in_array('procedures', $hidden, true) && $db->getPresence('procedures')) {
|
||||
$retval['procedures'] = new NodeProcedureContainer();
|
||||
}
|
||||
|
||||
if (! in_array('events', $hidden) && $db->getPresence('events')) {
|
||||
if (! in_array('events', $hidden, true) && $db->getPresence('events')) {
|
||||
$retval['events'] = new NodeEventContainer();
|
||||
}
|
||||
|
||||
@ -1031,8 +1031,8 @@ class NavigationTree
|
||||
|
||||
// if node name itself is in sterile, then allow
|
||||
$nodeIsGroup = $node->isGroup
|
||||
|| (! in_array($parentName, $sterile) && ! $node->isNew)
|
||||
|| (in_array($node->realName, $sterile) && $node->children !== []);
|
||||
|| (! in_array($parentName, $sterile, true) && ! $node->isNew)
|
||||
|| (in_array($node->realName, $sterile, true) && $node->children !== []);
|
||||
if ($nodeIsGroup) {
|
||||
$match = $this->findTreeMatch($this->vPath, $paths['vPath_clean']);
|
||||
$linkClasses = $node->getCssClasses($match);
|
||||
|
||||
@ -786,7 +786,7 @@ class Node
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($arr[0], $retval)) {
|
||||
if (in_array($arr[0], $retval, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ class Node
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($arr[0], $retval)) {
|
||||
if (in_array($arr[0], $retval, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ class NodeDatabase extends Node
|
||||
if ($relationParameters->navigationItemsHidingFeature !== null) {
|
||||
$hiddenItems = $this->getHiddenItems($relationParameters, substr($type, 0, -1));
|
||||
foreach ($retval as $key => $item) {
|
||||
if (! in_array($item, $hiddenItems)) {
|
||||
if (! in_array($item, $hiddenItems, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,11 @@ class Normalization
|
||||
$column = $def->field;
|
||||
$extractedColumnSpec = Util::extractColumnSpec($def->type);
|
||||
|
||||
if ($columnTypeList !== [] && ! in_array(mb_strtoupper($extractedColumnSpec['type']), $columnTypeList)) {
|
||||
if (
|
||||
$columnTypeList !== [] && ! in_array(mb_strtoupper(
|
||||
$extractedColumnSpec['type'],
|
||||
), $columnTypeList, true)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -411,7 +415,7 @@ class Normalization
|
||||
);
|
||||
$cnt = 0;
|
||||
foreach ($columns as $column) {
|
||||
if (in_array($column, $pk)) {
|
||||
if (in_array($column, $pk, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -691,7 +695,7 @@ class Normalization
|
||||
);
|
||||
$query = 'ALTER TABLE ' . Util::backquote($originalTable);
|
||||
foreach ($columns as $col) {
|
||||
if (in_array($col, $colPresent)) {
|
||||
if (in_array($col, $colPresent, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -836,7 +840,7 @@ class Normalization
|
||||
}
|
||||
|
||||
foreach ($columns as $column) {
|
||||
if (in_array($column, $pk)) {
|
||||
if (in_array($column, $pk, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -846,7 +850,7 @@ class Normalization
|
||||
}
|
||||
|
||||
foreach ($columns as $column) {
|
||||
if (in_array($column, $pk)) {
|
||||
if (in_array($column, $pk, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -913,7 +917,7 @@ class Normalization
|
||||
$table,
|
||||
);
|
||||
foreach ($columns as $column) {
|
||||
if (in_array($column, $pk)) {
|
||||
if (in_array($column, $pk, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ class AuthenticationSignon extends AuthenticationPlugin
|
||||
|
||||
if (
|
||||
isset($sessionCookieParams['samesite'])
|
||||
&& ! in_array($sessionCookieParams['samesite'], ['Lax', 'Strict'])
|
||||
&& ! in_array($sessionCookieParams['samesite'], ['Lax', 'Strict'], true)
|
||||
) {
|
||||
// Not a valid value for samesite
|
||||
unset($sessionCookieParams['samesite']);
|
||||
|
||||
@ -584,7 +584,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
|
||||
$fmtPre = '';
|
||||
$fmtPost = '';
|
||||
if (in_array($column->field, $uniqueKeys)) {
|
||||
if (in_array($column->field, $uniqueKeys, true)) {
|
||||
$fmtPre = '<strong>' . $fmtPre;
|
||||
$fmtPost .= '</strong>';
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ class ExportLatex extends ExportPlugin
|
||||
$localBuffer = '\\textit{' . mb_substr($localBuffer, 0, $pos) . '}' . mb_substr($localBuffer, $pos);
|
||||
}
|
||||
|
||||
if (in_array($fieldName, $uniqueKeys)) {
|
||||
if (in_array($fieldName, $uniqueKeys, true)) {
|
||||
$pos = (int) mb_strpos($localBuffer, "\000");
|
||||
$localBuffer = '\\textbf{' . mb_substr($localBuffer, 0, $pos) . '}' . mb_substr($localBuffer, $pos);
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ class ExportTexytext extends ExportPlugin
|
||||
|
||||
$fmtPre = '';
|
||||
$fmtPost = '';
|
||||
if (in_array($column->field, $uniqueKeys)) {
|
||||
if (in_array($column->field, $uniqueKeys, true)) {
|
||||
$fmtPre = '**' . $fmtPre;
|
||||
$fmtPost .= '**';
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ class DiaRelationSchema extends ExportRelationSchema
|
||||
// put the foreign table on the schema only if selected by the user
|
||||
// (do not use array_search() because we would have to do a === false and this is not PHP3 compatible)
|
||||
if ($masterField !== 'foreign_keys_data') {
|
||||
if (in_array($rel['foreign_table'], $alltables)) {
|
||||
if (in_array($rel['foreign_table'], $alltables, true)) {
|
||||
$this->addRelation(
|
||||
$oneTable,
|
||||
$masterField,
|
||||
@ -116,7 +116,7 @@ class DiaRelationSchema extends ExportRelationSchema
|
||||
}
|
||||
|
||||
foreach ($rel as $oneKey) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables)) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
* to do a === false and this is not PHP3 compatible)
|
||||
*/
|
||||
if ($masterField !== 'foreign_keys_data') {
|
||||
if (in_array($rel['foreign_table'], $alltables)) {
|
||||
if (in_array($rel['foreign_table'], $alltables, true)) {
|
||||
$this->addRelation(
|
||||
$oneTable,
|
||||
$this->eps->getFont(),
|
||||
@ -127,7 +127,7 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
}
|
||||
|
||||
foreach ($rel as $oneKey) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables)) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ class PdfRelationSchema extends ExportRelationSchema
|
||||
// (do not use array_search() because we would have to
|
||||
// to do a === false and this is not PHP3 compatible)
|
||||
if ($masterField !== 'foreign_keys_data') {
|
||||
if (in_array($rel['foreign_table'], $alltables)) {
|
||||
if (in_array($rel['foreign_table'], $alltables, true)) {
|
||||
$this->addRelation($oneTable, $masterField, $rel['foreign_table'], $rel['foreign_field']);
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ class PdfRelationSchema extends ExportRelationSchema
|
||||
}
|
||||
|
||||
foreach ($rel as $oneKey) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables)) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
* to do a === false and this is not PHP3 compatible)
|
||||
*/
|
||||
if ($masterField !== 'foreign_keys_data') {
|
||||
if (in_array($rel['foreign_table'], $alltables)) {
|
||||
if (in_array($rel['foreign_table'], $alltables, true)) {
|
||||
$this->addRelation(
|
||||
$oneTable,
|
||||
$this->svg->getFont(),
|
||||
@ -142,7 +142,7 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
}
|
||||
|
||||
foreach ($rel as $oneKey) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables)) {
|
||||
if (! in_array($oneKey['ref_table_name'], $alltables, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ class Compatibility
|
||||
// except TINYINT(1).
|
||||
// See: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html
|
||||
$integerTypes = ['SMALLINT', 'MEDIUMINT', 'INT', 'BIGINT'];
|
||||
$typeLengthNotAllowed = in_array($type, $integerTypes) || $type === 'TINYINT' && $length !== '1';
|
||||
$typeLengthNotAllowed = in_array($type, $integerTypes, true) || $type === 'TINYINT' && $length !== '1';
|
||||
|
||||
return ! (self::isIntegersLengthRestricted($dbi) && $typeLengthNotAllowed);
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ class ReplicationGui
|
||||
'Replicate_Wild_Do_Table',
|
||||
'Replicate_Wild_Ignore_Table',
|
||||
];
|
||||
if (! in_array($variable, $variablesWrap)) {
|
||||
if (! in_array($variable, $variablesWrap, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ class Privileges
|
||||
$usersGrants = explode(',', $row['Table_priv']);
|
||||
|
||||
foreach ($avGrants as $currentGrant) {
|
||||
$row[$currentGrant . '_priv'] = in_array($currentGrant, $usersGrants) ? 'Y' : 'N';
|
||||
$row[$currentGrant . '_priv'] = in_array($currentGrant, $usersGrants, true) ? 'Y' : 'N';
|
||||
}
|
||||
|
||||
unset($row['Table_priv']);
|
||||
@ -1462,7 +1462,7 @@ class Privileges
|
||||
|
||||
$dbRightsSqls = [];
|
||||
foreach ($tablesToSearchForUsers as $tableSearchIn) {
|
||||
if (! in_array($tableSearchIn, $tables)) {
|
||||
if (! in_array($tableSearchIn, $tables, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1614,6 +1614,7 @@ class Privileges
|
||||
$onePrivilege['grant'] = in_array(
|
||||
'Grant',
|
||||
explode(',', $row['Table_priv']),
|
||||
true,
|
||||
);
|
||||
$onePrivilege['column_privs'] = ! empty($row['Column_priv']);
|
||||
$onePrivilege['privileges'] = implode(',', $this->extractPrivInfo($row, true));
|
||||
@ -1625,6 +1626,7 @@ class Privileges
|
||||
$onePrivilege['grant'] = in_array(
|
||||
'Grant',
|
||||
explode(',', $row['Proc_priv']),
|
||||
true,
|
||||
);
|
||||
|
||||
$privs = $this->parseProcPriv($row['Proc_priv']);
|
||||
@ -1682,7 +1684,7 @@ class Privileges
|
||||
$databases = [];
|
||||
$escapedDatabases = [];
|
||||
foreach ($predDbArray as $currentDb) {
|
||||
if (in_array($currentDb, $databasesToSkip)) {
|
||||
if (in_array($currentDb, $databasesToSkip, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1691,7 +1693,7 @@ class Privileges
|
||||
// because the list of databases has special characters
|
||||
// already escaped in $foundRows,
|
||||
// contrary to the output of SHOW DATABASES
|
||||
if (in_array($currentDbEscaped, $foundRows)) {
|
||||
if (in_array($currentDbEscaped, $foundRows, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1707,7 +1709,7 @@ class Privileges
|
||||
$tables = [];
|
||||
if ($result) {
|
||||
while ($row = $result->fetchRow()) {
|
||||
if (in_array($row[0], $foundRows)) {
|
||||
if (in_array($row[0], $foundRows, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1721,7 +1723,7 @@ class Privileges
|
||||
|
||||
$routines = [];
|
||||
foreach ($routineData as $routine) {
|
||||
if (in_array($routine['name'], $foundRows)) {
|
||||
if (in_array($routine['name'], $foundRows, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2797,38 +2799,38 @@ class Privileges
|
||||
|
||||
while ($row2 = $res2->fetchAssoc()) {
|
||||
$tmpArray = explode(',', $row2['Column_priv']);
|
||||
if (in_array('Select', $tmpArray)) {
|
||||
if (in_array('Select', $tmpArray, true)) {
|
||||
$tmpPrivs2['Select'][] = $row2['Column_name'];
|
||||
}
|
||||
|
||||
if (in_array('Insert', $tmpArray)) {
|
||||
if (in_array('Insert', $tmpArray, true)) {
|
||||
$tmpPrivs2['Insert'][] = $row2['Column_name'];
|
||||
}
|
||||
|
||||
if (in_array('Update', $tmpArray)) {
|
||||
if (in_array('Update', $tmpArray, true)) {
|
||||
$tmpPrivs2['Update'][] = $row2['Column_name'];
|
||||
}
|
||||
|
||||
if (! in_array('References', $tmpArray)) {
|
||||
if (! in_array('References', $tmpArray, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$tmpPrivs2['References'][] = $row2['Column_name'];
|
||||
}
|
||||
|
||||
if ($tmpPrivs2['Select'] !== [] && ! in_array('SELECT', $tmpPrivs1)) {
|
||||
if ($tmpPrivs2['Select'] !== [] && ! in_array('SELECT', $tmpPrivs1, true)) {
|
||||
$tmpPrivs1[] = 'SELECT (`' . implode('`, `', $tmpPrivs2['Select']) . '`)';
|
||||
}
|
||||
|
||||
if ($tmpPrivs2['Insert'] !== [] && ! in_array('INSERT', $tmpPrivs1)) {
|
||||
if ($tmpPrivs2['Insert'] !== [] && ! in_array('INSERT', $tmpPrivs1, true)) {
|
||||
$tmpPrivs1[] = 'INSERT (`' . implode('`, `', $tmpPrivs2['Insert']) . '`)';
|
||||
}
|
||||
|
||||
if ($tmpPrivs2['Update'] !== [] && ! in_array('UPDATE', $tmpPrivs1)) {
|
||||
if ($tmpPrivs2['Update'] !== [] && ! in_array('UPDATE', $tmpPrivs1, true)) {
|
||||
$tmpPrivs1[] = 'UPDATE (`' . implode('`, `', $tmpPrivs2['Update']) . '`)';
|
||||
}
|
||||
|
||||
if ($tmpPrivs2['References'] !== [] && ! in_array('REFERENCES', $tmpPrivs1)) {
|
||||
if ($tmpPrivs2['References'] !== [] && ! in_array('REFERENCES', $tmpPrivs1, true)) {
|
||||
$tmpPrivs1[] = 'REFERENCES (`' . implode('`, `', $tmpPrivs2['References']) . '`)';
|
||||
}
|
||||
|
||||
@ -2837,7 +2839,7 @@ class Privileges
|
||||
. Util::backquote($row['Table_name'])
|
||||
. ' TO ' . $this->dbi->quoteString($username)
|
||||
. '@' . $this->dbi->quoteString($hostname)
|
||||
. (in_array('Grant', explode(',', $row['Table_priv']))
|
||||
. (in_array('Grant', explode(',', $row['Table_priv']), true)
|
||||
? ' WITH GRANT OPTION;'
|
||||
: ';');
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ final class ColumnsDefinition
|
||||
} elseif (isset($fieldsMeta[$columnNumber])) {
|
||||
$columnMeta = $fieldsMeta[$columnNumber];
|
||||
$virtual = ['VIRTUAL', 'PERSISTENT', 'VIRTUAL GENERATED', 'STORED GENERATED'];
|
||||
if (in_array($columnMeta['Extra'], $virtual)) {
|
||||
if (in_array($columnMeta['Extra'], $virtual, true)) {
|
||||
$tableObj = new Table($GLOBALS['table'], $GLOBALS['db'], $this->dbi);
|
||||
$expressions = $tableObj->getColumnGenerationExpression($columnMeta['Field']);
|
||||
$columnMeta['Expression'] = is_array($expressions) ? $expressions[$columnMeta['Field']] : null;
|
||||
|
||||
@ -287,7 +287,7 @@ final class Search
|
||||
// If the where clause is something like 'IsEmpty(`spatial_col_name`)'
|
||||
if (isset($geomUnaryFunctions[$geomFunc]) && trim($criteriaValues) == '') {
|
||||
$where = $geomFunctionApplied;
|
||||
} elseif (in_array($type, Gis::getDataTypes()) && ! empty($criteriaValues)) {
|
||||
} elseif (in_array($type, Gis::getDataTypes(), true) && ! empty($criteriaValues)) {
|
||||
// create gis data from the criteria input
|
||||
$gisData = Gis::createData($criteriaValues, $this->dbi->getVersion());
|
||||
$where = $geomFunctionApplied . ' ' . $funcType . ' ' . $gisData;
|
||||
|
||||
@ -1475,7 +1475,7 @@ class Table implements Stringable
|
||||
}
|
||||
|
||||
// a column might have a primary and an unique index on it
|
||||
if (in_array($possibleColumn, $return)) {
|
||||
if (in_array($possibleColumn, $return, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -2007,7 +2007,7 @@ class Table implements Stringable
|
||||
if (
|
||||
$index->getChoice() !== 'SPATIAL'
|
||||
&& $index->getChoice() !== 'FULLTEXT'
|
||||
&& in_array($type, Index::getIndexTypes())
|
||||
&& in_array($type, Index::getIndexTypes(), true)
|
||||
&& ! $this->isEngine('TOKUDB')
|
||||
) {
|
||||
$sqlQuery .= ' USING ' . $type;
|
||||
|
||||
@ -191,20 +191,23 @@ class Triggers
|
||||
$GLOBALS['errors'][] = __('You must provide a trigger name!');
|
||||
}
|
||||
|
||||
if (! empty($_POST['item_timing']) && in_array($_POST['item_timing'], $this->time)) {
|
||||
if (! empty($_POST['item_timing']) && in_array($_POST['item_timing'], $this->time, true)) {
|
||||
$query .= $_POST['item_timing'] . ' ';
|
||||
} else {
|
||||
$GLOBALS['errors'][] = __('You must provide a valid timing for the trigger!');
|
||||
}
|
||||
|
||||
if (! empty($_POST['item_event']) && in_array($_POST['item_event'], $this->event)) {
|
||||
if (! empty($_POST['item_event']) && in_array($_POST['item_event'], $this->event, true)) {
|
||||
$query .= $_POST['item_event'] . ' ';
|
||||
} else {
|
||||
$GLOBALS['errors'][] = __('You must provide a valid event for the trigger!');
|
||||
}
|
||||
|
||||
$query .= 'ON ';
|
||||
if (! empty($_POST['item_table']) && in_array($_POST['item_table'], $this->dbi->getTables($GLOBALS['db']))) {
|
||||
if (
|
||||
! empty($_POST['item_table'])
|
||||
&& in_array($_POST['item_table'], $this->dbi->getTables($GLOBALS['db']), true)
|
||||
) {
|
||||
$query .= Util::backquote($_POST['item_table']);
|
||||
} else {
|
||||
$GLOBALS['errors'][] = __('You must provide a valid table name!');
|
||||
|
||||
@ -42,7 +42,7 @@ class TwoFactor
|
||||
|
||||
protected TwoFactorPlugin $backend;
|
||||
|
||||
/** @var mixed[] */
|
||||
/** @var string[] */
|
||||
protected array $available;
|
||||
|
||||
private UserPreferences $userPreferences;
|
||||
@ -101,7 +101,7 @@ class TwoFactor
|
||||
return $this->backend;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
/** @return string[] */
|
||||
public function getAvailable(): array
|
||||
{
|
||||
return $this->available;
|
||||
@ -174,7 +174,7 @@ class TwoFactor
|
||||
public function getBackendClass(string $name): string
|
||||
{
|
||||
$result = TwoFactorPlugin::class;
|
||||
if (in_array($name, $this->available)) {
|
||||
if (in_array($name, $this->available, true)) {
|
||||
/** @psalm-var class-string<TwoFactorPlugin> $result */
|
||||
$result = 'PhpMyAdmin\\Plugins\\TwoFactor\\' . ucfirst($name);
|
||||
} elseif ($name !== '') {
|
||||
@ -257,7 +257,7 @@ class TwoFactor
|
||||
$cls = $this->getBackendClass($name);
|
||||
$this->backend = new $cls($this);
|
||||
} else {
|
||||
if (! in_array($name, $this->available)) {
|
||||
if (! in_array($name, $this->available, true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ class Types
|
||||
*/
|
||||
public function isUnaryOperator(string $op): bool
|
||||
{
|
||||
return in_array($op, $this->getUnaryOperators());
|
||||
return in_array($op, $this->getUnaryOperators(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
10
src/Util.php
10
src/Util.php
@ -95,7 +95,7 @@ class Util
|
||||
*/
|
||||
public static function showIcons(string $value): bool
|
||||
{
|
||||
return in_array(Config::getInstance()->settings[$value], ['icons', 'both']);
|
||||
return in_array(Config::getInstance()->settings[$value], ['icons', 'both'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,7 +105,7 @@ class Util
|
||||
*/
|
||||
public static function showText(string $value): bool
|
||||
{
|
||||
return in_array(Config::getInstance()->settings[$value], ['text', 'both']);
|
||||
return in_array(Config::getInstance()->settings[$value], ['text', 'both'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1819,7 +1819,7 @@ class Util
|
||||
$whereAdded = true;
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['tbl_type']) && in_array($_REQUEST['tbl_type'], ['table', 'view'])) {
|
||||
if (isset($_REQUEST['tbl_type']) && in_array($_REQUEST['tbl_type'], ['table', 'view'], true)) {
|
||||
$tblGroupSql .= $whereAdded ? ' AND' : ' WHERE';
|
||||
if ($_REQUEST['tbl_type'] === 'view') {
|
||||
$tblGroupSql .= " `Table_type` NOT IN ('BASE TABLE', 'SYSTEM VERSIONED')";
|
||||
@ -2055,7 +2055,7 @@ class Util
|
||||
'sort_order' => $futureSortOrder,
|
||||
];
|
||||
|
||||
if (isset($_REQUEST['tbl_type']) && in_array($_REQUEST['tbl_type'], ['view', 'table'])) {
|
||||
if (isset($_REQUEST['tbl_type']) && in_array($_REQUEST['tbl_type'], ['view', 'table'], true)) {
|
||||
$urlParams['tbl_type'] = $_REQUEST['tbl_type'];
|
||||
}
|
||||
|
||||
@ -2098,7 +2098,7 @@ class Util
|
||||
|
||||
[$keyName, $value] = $keyValueArray;
|
||||
$value = trim(strtolower($value));
|
||||
if (strtolower(trim($keyName)) === 'proto' && in_array($value, ['http', 'https'])) {
|
||||
if (strtolower(trim($keyName)) === 'proto' && in_array($value, ['http', 'https'], true)) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ abstract class AbstractTestCase extends TestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
foreach (array_keys($GLOBALS) as $key) {
|
||||
if (in_array($key, $this->globalsAllowList)) {
|
||||
if (in_array($key, $this->globalsAllowList, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ abstract class AbstractTestCase extends TestCase
|
||||
Config::$instance = null;
|
||||
(new ReflectionProperty(Template::class, 'twig'))->setValue(null, null);
|
||||
foreach (array_keys($GLOBALS) as $key) {
|
||||
if (in_array($key, $this->globalsAllowList)) {
|
||||
if (in_array($key, $this->globalsAllowList, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ class TwoFactorTest extends AbstractTestCase
|
||||
$request = new ServerRequest($this->createStub(ServerRequestInterface::class));
|
||||
|
||||
$object = $this->getTwoFactorAndLoadConfig('user', null);
|
||||
if (! in_array('application', $object->getAvailable())) {
|
||||
if (! in_array('application', $object->getAvailable(), true)) {
|
||||
$this->markTestSkipped('google2fa not available');
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ class TwoFactorTest extends AbstractTestCase
|
||||
$request = new ServerRequest($this->createStub(ServerRequestInterface::class));
|
||||
|
||||
$object = $this->getTwoFactorAndLoadConfig('user', null);
|
||||
if (! in_array('key', $object->getAvailable())) {
|
||||
if (! in_array('key', $object->getAvailable(), true)) {
|
||||
$this->markTestSkipped('u2f-php-server not available');
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ class TwoFactorTest extends AbstractTestCase
|
||||
$request = new ServerRequest($this->createStub(ServerRequestInterface::class));
|
||||
|
||||
$object = $this->getTwoFactorAndLoadConfig('user', null);
|
||||
if (! in_array('key', $object->getAvailable())) {
|
||||
if (! in_array('key', $object->getAvailable(), true)) {
|
||||
$this->markTestSkipped('u2f-php-server not available');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user