1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

PHPStan: Fix types

This commit is contained in:
Jakub Vrana
2025-03-30 21:08:06 +02:00
parent c05b1ac048
commit 016c1b2357
7 changed files with 34 additions and 35 deletions

View File

@@ -4,8 +4,9 @@ parameters:
ignoreErrors:
# need to fix
- "~^Function Adminer\\\\fields_from_edit\\(\\) should return~" # Mongo and SimpleDB
- "~^Function Adminer\\\\fields_from_edit\\(\\) should return|Adminer\\\\Driver::\\$primary~" # Mongo and SimpleDB
- "~Adminer\\\\Result.*mysqli_result~" # mysqli_result
- "~Function Adminer\\\\queries\\(\\) never returns Adminer\\\\Result~" # mysqli_result
# not real problems
- identifier: include.fileNotFound # includes in include/ relative from index.php
@@ -14,6 +15,9 @@ parameters:
- "~an unknown class OCI-?Lob~" # this looks like PHPStan bug
- "~^Variable \\$error might not be defined~" # declared in bootstrap.inc.php
- "~^Constant LANG not found~" # defined in lang.inc.php
- "~ an undefined \\w+ Adminer\\\\Db::~" # defined in that versions of Db
- "~^Call to an undefined method Adminer\\\\Result::seek~" # defined in MS SQL
- "~^Call to an undefined method Adminer\\\\Driver::setUserTypes~" # defined in PostgreSQL
- "~expects int, float given~" # this will work
- "~expects bool~" # truthy values
- "~fread expects int<1, max>, 100000~" # 1e6
@@ -25,14 +29,11 @@ parameters:
- adminer/include/pdo.inc.php
- adminer/drivers/*
-
message: "~ to an undefined ~" # PostgreSQL has this in its version of Db
path: adminer/drivers/pgsql.inc.php
# it probably doesn't like $ar[$key] instead of isset($ar[$key]) and thinks that $ar[$key] is always set
- identifier: identical.alwaysFalse
- identifier: notEqual.alwaysFalse
- identifier: notIdentical.alwaysTrue
- identifier: booleanNot.alwaysTrue
- identifier: booleanNot.alwaysFalse
- identifier: booleanAnd.alwaysFalse
- identifier: booleanAnd.leftAlwaysTrue
@@ -51,7 +52,6 @@ parameters:
- compile.php # compile_file()
excludePaths:
- adminer/adminer-plugins*
- adminer/lang/
- adminer/designs.php
- adminer/elastic.php
- adminer/sqlite.php