mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
PHPStan: Fix level 2 errors
This commit is contained in:
13
phpstan.neon
13
phpstan.neon
@@ -1,14 +1,25 @@
|
||||
parameters:
|
||||
level: 1
|
||||
level: 2
|
||||
ignoreErrors:
|
||||
- identifier: include.fileNotFound # relative includes
|
||||
- identifier: includeOnce.fileNotFound # ./adminer-plugins.php
|
||||
- "~^Function (set_magic_quotes_runtime|mysql_)~" # PHP < 7 functions
|
||||
- "~^Instantiated class Adminer\\w~" # no support for classes defined inside function
|
||||
- "~^Variable \\$(adminer|connection|driver|drivers|error|HTTPS|LANG|langs|permanent|has_token|token|translations|VERSION) might not be defined~" # declared in bootstrap.inc.php
|
||||
- "~^Comparison operation \"==\" between \\(array\\|float\\|int\\) and 1~" # false positive
|
||||
- "~OCI-?Lob~" # maybe include stub?
|
||||
- "~Adminer\\\\Db::~" # diagnose!
|
||||
paths:
|
||||
- .
|
||||
phpVersion:
|
||||
min: 70100
|
||||
max: 80499
|
||||
checkMissingCallableSignature: true
|
||||
typeAliases:
|
||||
TableStatus: "array{Name:string, Engine:string, Comment:string, Oid:int, Rows:int, Collation:string, Auto_increment:int, Data_length:int, Index_length:int, Data_free:int}"
|
||||
Field: "array{field:string, full_type:string, type:string, length:int, unsigned:string, default:string, null:bool, auto_increment:bool, on_update:string, collation:string, privileges:int[], comment:string, primary:bool, generated:string}"
|
||||
Index: "array{type:string, columns:list<string>, lengths:list<int>, descs:list<bool>}"
|
||||
ForeignKey: "array{db:string, ns:string, table:string, source:list<string>, target:list<string>, on_delete:string, on_update:string}"
|
||||
Trigger: "array{Trigger:string, Timing:string, Event:string, Of:string, Type:string, Statement:string}"
|
||||
Routine: "array{fields:list<array{field:string, type:string, length:string, unsigned:string, null:bool, full_type:string, inout:string, collation:string}>, comment:string, returns:array, definition:string, language:string}"
|
||||
BackwardKey: "array{name:string, keys:string[][]}"
|
||||
|
Reference in New Issue
Block a user