-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PHPStan and fix level 1 errors (#307)
* Add PHPStan level 1 Co-authored-by: Nicola Asuni <[email protected]>
- Loading branch information
1 parent
154bba4
commit 37aa6ee
Showing
8 changed files
with
90 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/.gitattributes export-ignore | ||
/tests export-ignore | ||
/scripts export-ignore | ||
/phpstan.neon.dist export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
parameters: | ||
level: 1 | ||
paths: | ||
- ./ | ||
excludePaths: | ||
- vendor/ | ||
# remove once https://github.com/phpstan/phpstan/issues/7955 is fixed | ||
- fonts/ | ||
|
||
scanFiles: | ||
- tcpdf_autoconfig.php | ||
|
||
ignoreErrors: | ||
- '~^Constant (PDF_HEADER_LOGO|K_PATH_CACHE|K_PATH_FONTS|K_PATH_IMAGES|K_PATH_URL) not found\.$~' | ||
- '~^Constructor of class TCPDF has an unused parameter \$diskcache\.$~' | ||
- '~^Variable \$\w+ might not be defined\.$~' | ||
- '~^Method TCPDF(_FILTERS)?::\w+\(\) should return .+ but return statement is missing\.$~' | ||
|
||
# mcrypt does not support PHP 7.2 or later | ||
- | ||
message: '~^(Constant MCRYPT_RIJNDAEL_128 not found\.|Function mcrypt_get_cipher_name not found\.)$~' | ||
path: tcpdf.php | ||
count: 2 | ||
- | ||
message: '~^(Constant (MCRYPT_ARCFOUR|MCRYPT_MODE_CBC|MCRYPT_MODE_STREAM|MCRYPT_RAND|MCRYPT_RIJNDAEL_128) not found\.|Function (mcrypt_create_iv|mcrypt_encrypt|mcrypt_get_iv_size) not found\.)$~' | ||
path: include/tcpdf_static.php | ||
count: 16 | ||
|
||
- | ||
message: '~^(Call to static method create\(\) on an unknown class Symfony\\Component\\Finder\\Finder\.|Instantiated class Doctum\\(Doctum|RemoteRepository\\GitHubRemoteRepository) not found\.)$~' | ||
path: scripts/doctum.php | ||
count: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters