-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from kenjis/chore-add-phpstan
chore: add PHPStan
- Loading branch information
Showing
11 changed files
with
389 additions
and
53 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 |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
$ignoreErrors = []; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Commands\\\\OAuthSetup\\:\\:copyAndReplace\\(\\) has parameter \\$replaces with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Commands/OAuthSetup.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Commands\\\\OAuthSetup\\:\\:\\$arguments type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Commands/OAuthSetup.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Commands\\\\OAuthSetup\\:\\:\\$distPath has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Commands/OAuthSetup.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Config\\\\Registrar\\:\\:Generators\\(\\) return type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Config/Registrar.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Call to deprecated function random_string\\(\\)\\: | ||
The type \'basic\', \'md5\', and \'sha1\' are deprecated\\. They are not cryptographically secure\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Controllers/OAuthController.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Class Datamweb\\\\ShieldOAuth\\\\Controllers\\\\LoginModel not found\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Controllers/OAuthController.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Controllers\\\\OAuthController\\:\\:checkExistenceUser\\(\\) has parameter \\$find with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Controllers/OAuthController.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Controllers\\\\OAuthController\\:\\:syncingUserInfo\\(\\) has parameter \\$find with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Controllers/OAuthController.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Controllers\\\\OAuthController\\:\\:syncingUserInfo\\(\\) has parameter \\$updateFildes with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Controllers/OAuthController.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Access to an undefined property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\Basic\\\\AbstractOAuth\\:\\:\\$token\\.$#', | ||
'count' => 2, | ||
'path' => __DIR__ . '/src/Libraries/Basic/AbstractOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\Basic\\\\AbstractOAuth\\:\\:fetchAccessTokenWithAuthCode\\(\\) has parameter \\$allGet with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/Basic/AbstractOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\Basic\\\\AbstractOAuth\\:\\:getColumnsName\\(\\) return type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/Basic/AbstractOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\Basic\\\\AbstractOAuth\\:\\:getUserInfo\\(\\) has parameter \\$allGet with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/Basic/AbstractOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\Basic\\\\AbstractOAuth\\:\\:setColumnsName\\(\\) return type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/Basic/AbstractOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Call to deprecated function random_string\\(\\)\\: | ||
The type \'basic\', \'md5\', and \'sha1\' are deprecated\\. They are not cryptographically secure\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:fetchAccessTokenWithAuthCode\\(\\) has parameter \\$allGet with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:setColumnsName\\(\\) has parameter \\$userInfo with no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:setColumnsName\\(\\) return type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$API_CODE_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$API_TOKEN_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$API_USER_INFO_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$APPLICATION_NAME has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$client has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GithubOAuth\\:\\:\\$config has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Variable \\$usersColumnsName might not be defined\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GithubOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Call to deprecated function random_string\\(\\)\\: | ||
The type \'basic\', \'md5\', and \'sha1\' are deprecated\\. They are not cryptographically secure\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:fetchAccessTokenWithAuthCode\\(\\) has parameter \\$allGet with no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:setColumnsName\\(\\) has parameter \\$userInfo with no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Method Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:setColumnsName\\(\\) return type has no value type specified in iterable type array\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$API_CODE_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$API_TOKEN_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$API_USER_INFO_URL has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$APPLICATION_NAME has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$client has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Property Datamweb\\\\ShieldOAuth\\\\Libraries\\\\GoogleOAuth\\:\\:\\$config has no type specified\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
$ignoreErrors[] = [ | ||
'message' => '#^Variable \\$usersColumnsName might not be defined\\.$#', | ||
'count' => 1, | ||
'path' => __DIR__ . '/src/Libraries/GoogleOAuth.php', | ||
]; | ||
|
||
return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; |
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,23 @@ | ||
includes: | ||
- phpstan-baseline.php | ||
parameters: | ||
tmpDir: build/phpstan | ||
level: 6 | ||
paths: | ||
- src/ | ||
bootstrapFiles: | ||
- vendor/codeigniter4/framework/system/Test/bootstrap.php | ||
excludePaths: | ||
- app/Config/Routes.php | ||
- app/Views/* | ||
ignoreErrors: | ||
universalObjectCratesClasses: | ||
- CodeIgniter\Entity | ||
- CodeIgniter\Entity\Entity | ||
- Faker\Generator | ||
scanDirectories: | ||
- vendor/codeigniter4/framework/system/Helpers | ||
dynamicConstantNames: | ||
- APP_NAMESPACE | ||
- CI_DEBUG | ||
- ENVIRONMENT |
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
Oops, something went wrong.