diff --git a/phpstan.neon b/phpstan.neon index f920ac9c5..a00c612b2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,10 +3,27 @@ includes: - vendor/nesbot/carbon/extension.neon parameters: - # Level 10 is the highest level level: 0 - # Laravel specific configurations + paths: + - app/ + - routes/ + - tests/ + + excludePaths: + - bootstrap/cache/* + - storage/ + - vendor/ + + # Laravel-specific analysis + databaseMigrationsPath: + - database/migrations + configDirectories: + - config + translationDirectories: + - resources/lang + + # Feature checks noModelMake: true noUnnecessaryCollectionCall: true checkModelProperties: true @@ -15,19 +32,12 @@ parameters: checkModelAppends: true checkModelMethodVisibility: true checkAuthCallsWhenInRequestScope: true - + parseModelCastsMethod: true + enableMigrationCache: true checkMissingTranslations: false - translationDirectories: - - resources/lang - - paths: - - app/ - - routes/ - - tests/ - excludePaths: - - bootstrap/cache/* - - storage/ - - vendor/ + # Ignore intentional patterns + ignoreErrors: + - '#Unsafe usage of new static#' reportUnmatchedIgnoredErrors: false