Skip to content

Commit

Permalink
Add phpstan baseline config
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab committed Aug 23, 2023
1 parent 6425c17 commit 58fd8e9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(array\\<int, string\\>\\|string\\)\\: mixed\\)\\|null, 'strtolower' given\\.$#"
count: 1
path: src/Locale.php

-
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, array\\<int, array\\<int, array\\<int, array\\<int, int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|string given\\.$#"
count: 1
path: src/Locale.php

-
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, array\\<int, array\\<int, array\\<int, int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|string given\\.$#"
count: 2
path: src/Locale.php

-
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|null given\\.$#"
count: 2
path: src/Locale.php

-
message: "#^Parameter \\#1 \\$subject of static method ipl\\\\Stdlib\\\\Str\\:\\:trimSplit\\(\\) expects string\\|null, array\\<int, array\\<int, array\\<int, array\\<int, int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|string given\\.$#"
count: 1
path: src/Locale.php

-
message: "#^Parameter \\#1 \\$subject of static method ipl\\\\Stdlib\\\\Str\\:\\:trimSplit\\(\\) expects string\\|null, array\\<int, array\\<int, array\\<int, int\\|string\\>\\|int\\|string\\>\\|int\\|string\\>\\|string given\\.$#"
count: 2
path: src/Locale.php
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
includes:
- phpstan-baseline.neon

parameters:
level: max

checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
treatPhpDocTypesAsCertain: false

paths:
- src

Expand Down

0 comments on commit 58fd8e9

Please sign in to comment.