Download the PHP package airlst/phpstan-config without Composer
On this page you can find all versions of the php package airlst/phpstan-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download airlst/phpstan-config
More information about airlst/phpstan-config
Files in airlst/phpstan-config
Package phpstan-config
Short Description PHPStan config for AirLST projects
License MIT
Homepage https://github.com/airlst/phpstan-config
Informations about the package phpstan-config
PHPStan config for AirLST projects
PHPStan config for AirLST projects.
Installation
You can install the package via Composer:
Make sure to allow the phpstan/extension-installer
plugin to run in your composer.json
:
Usage
Create a phpstan.php
in the root of your project with the following contents:
The constructor of the Factory
class takes an array of paths to be scanned for PHP files and analyzed. You can pass any number of paths to it.
Configuration
You can use following configuration options on the Factory
class by chaining them before create()
call:
level(int $level)
: Set the level of PHPStaninclude(string $file)
: Include additional PHPStan neon fileexclude(string $file)
: Exclude provided PHPStan neon filewithBleedingEdge()
: Use bleeding edge version of PHPStanuseCacheDir(string $cacheDir)
: Use cache directory for PHPStantypeCoverage(int $return, int $param, int $property, int $constant)
: Set type coverage percentage, default is 100% for alltypePerfect(bool $nullOverFalse, bool $noMixedProperty, bool $noMixedCaller, bool $narrowParam, bool $narrowReturn)
: Set type perfect configuration, by default all turned on. See rectorphp/type-perfect README for more details.addRule(string $file)
: Add additional rule to PHPStanignoreError(string $message, ?string $path, ?int $count, ?bool $reportUnmatched)
: Ignore provided error messagecheckMissingIterableValueType(bool $enable = true)
: Enables/DisablescheckMissingIterableValueType
rulecheckGenericClassInNonGenericObjectType(bool $enable = true)
: Enables/DisablescheckGenericClassInNonGenericObjectType
rulestrictRules()
: Enables/disables strict rules. For available method arguments you can checkphpstan/phpstan-strict-rules
documentation
Running PHPStan
Run PHPStan with the following command:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of phpstan-config with dependencies
phpstan/extension-installer Version ^1.4.3
phpstan/phpstan Version 1.12.8
phpstan/phpstan-deprecation-rules Version 1.2.1
phpstan/phpstan-strict-rules Version 1.6.1
rector/type-perfect Version 1.0.0
spaze/phpstan-disallowed-calls Version 3.5.1
tomasvotruba/type-coverage Version 1.0.0