Download the PHP package soyhuce/phpstan-extension without Composer
On this page you can find all versions of the php package soyhuce/phpstan-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soyhuce/phpstan-extension
More information about soyhuce/phpstan-extension
Files in soyhuce/phpstan-extension
Package phpstan-extension
Short Description Extra rules for phpstan analysis
License MIT
Homepage https://github.com/soyhuce/phpstan-extension
Informations about the package phpstan-extension
Extra rules for phpstan analysis
Strict rules for PHPStan and helpers for Laravel
Installation
You can install the package via composer:
If you use phpstan/extension-installer
, the extension is automatically installed and you're all set.
Otherwise, you need to add the extension in your phpstan.neon
file:
If you want only a subset of the rules, check the /vendor/soyhuce/phpstan-extension/extension.neon
file and copy the
rules you want to use.
Rules
CarbonCopyRule
Forbids usage of \Carbon\CarbonInterface::copy()
because it is probably linked to usage of a mutable DateTime.
NoAliasUseRule
Forbids usage of Laravel aliases and suggests to use the real class name instead.
NoMutableDateTimeStaticCallRule
Forbids usage of static methods on \DateTime
and its child classes.
NoMutableDateTimeUseRule
Forbids import of \DateTime
and its child classes.
NoNewMutableDateTimeRule
Forbids usage of new \DateTime()
and its child classes.
Extensions
RequestDateExtension
Provides return type for \Illuminate\Support\Request::date()
method.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Bastien Philippe
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of phpstan-extension with dependencies
illuminate/support Version ^11.0|^12.0
nesbot/carbon Version ^3.0
phpstan/phpstan Version ^2.0