Skip to content

Instantly share code, notes, and snippets.

@devNoiseConsulting
Created February 9, 2021 18:56
Show Gist options
  • Save devNoiseConsulting/f900444ff71051b02aeda520d5ed5eec to your computer and use it in GitHub Desktop.
Save devNoiseConsulting/f900444ff71051b02aeda520d5ed5eec to your computer and use it in GitHub Desktop.
phpstan.neon for Larastan checking a Laravel project
includes:
- ./vendor/nunomaduro/larastan/extension.neon
- phpstan-baseline.neon
parameters:
paths:
- app
# The level 8 is the highest level
level: 7
# I probably shouldn't ingore these errors, but I wanted these hidden when I focused on other errors.
ignoreErrors:
- '#Property [A-Za-z0-9\\]+::\$[A-Za-z0-9_]+ has no typehint specified#'
- '#Method [A-Za-z0-9\\]+::[A-Za-z0-9_]+\(\) has no return typehint specified#'
- '#Method [A-Za-z0-9\\]+::[A-Za-z0-9_]+\(\) has parameter \$[A-Za-z0-9_]+ with no typehint specified\.#'
- '#Method [A-Za-z0-9\\]+::[A-Za-z0-9_]+\(\) should return Illuminate\\Http\\Response but returns Illuminate\\.*\.#'
checkMissingIterableValueType: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment