Download the PHP package phpstan/phpstan-nette without Composer
On this page you can find all versions of the php package phpstan/phpstan-nette. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download phpstan/phpstan-nette
More information about phpstan/phpstan-nette
Files in phpstan/phpstan-nette
Download phpstan/phpstan-nette
More information about phpstan/phpstan-nette
Files in phpstan/phpstan-nette
Vendor phpstan
Package phpstan-nette
Short Description Nette Framework class reflection extension for PHPStan
License MIT
Package phpstan-nette
Short Description Nette Framework class reflection extension for PHPStan
License MIT
Please rate this library. Is it a good library?
Informations about the package phpstan-nette
Nette Framework extension for PHPStan
This extension provides following features:
Nette\ComponentModel\Container::getComponent()knows type of the component because it reads the return type oncreateComponent*(this works best in presenters and controls)- Array access on components (
$component['name']) resolves types viacreateComponent*methods Nette\DI\Container::getByTypeandcreateInstancereturn type based on first parameter (Foo::class).Nette\Forms\Container::getValuesreturn type based on$asArrayparameter.Nette\Forms\Container::getUntrustedValuesreturn type based on mapping class parameter.Nette\Forms\Controls\BaseControlfluent methods returnstaticinstead ofBaseControl.Nette\ComponentModel\Component::lookupreturn type based on$throwparameter.Nette\Application\UI\Component::getPresenterreturn type based on$throwparameter.Nette\Application\UI\Presenter::getSessionreturnsSessionorSessionSectionbased on arguments.- Dynamic methods of Nette\Utils\Html
- Magic Nette\Object and Nette\SmartObject properties
- Event listeners through the
on*properties - Presenter
@injectproperties are treated as initialized. - Defines early terminating method calls for Presenter methods to prevent
Undefined variableerrors - Understand the exact array shape coming from
Nette\Utils\Strings::match()andNette\Utils\Strings::matchAll()based on pattern Nette\Utils\Strings::replace()callback closure parameter type inferred from regex pattern
It also contains these framework-specific rules (can be enabled separately):
- Do not extend Nette\Object, use Nette\SmartObject trait instead
- Rethrow exceptions that are always meant to be rethrown (like
AbortException) - Validate regex patterns passed to
Nette\Utils\Stringsmethods
Installation
To use this extension, require it in Composer:
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config: To perform framework-specific checks, include also this file:All versions of phpstan-nette with dependencies
PHP Build Version
Package Version
The package phpstan/phpstan-nette contains the following files
Loading the files please wait ...