Download the PHP package samlitowitz/phpstan-opinionated-nomenclature without Composer
On this page you can find all versions of the php package samlitowitz/phpstan-opinionated-nomenclature. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samlitowitz/phpstan-opinionated-nomenclature
More information about samlitowitz/phpstan-opinionated-nomenclature
Files in samlitowitz/phpstan-opinionated-nomenclature
Package phpstan-opinionated-nomenclature
Short Description Opinionated PHPStan rules for naming things
License Apache-2.0
Informations about the package phpstan-opinionated-nomenclature
PHPStan Opinionated Nomenclature
Opinionated PHPStan rules for naming things.
Table of Contents
- Installation
- PHPStan Extension Installer
- Manual Installation
- Rules
- Namespace
- Class Like (Class, Interface, Trait)
- Class
- Interface
Installation
Install the extension via Composer.
This extension requires PHPStan to use.
PHPStan Extension Installer
Use the PHPStan Extension Installer to automatically install PHPStan extensions.
Manual Installation
Add vendor/samlitowitz/phpstan-opinionated-nomenclature/extension.neon
to the includes
section of
your phpstan.neon
or phpstan.neon.dist
file, i.e.
Rules
Namespace
-
Namespace names MUST NOT be equal to or end in
DTO
of any case (case-insensitive) - Namespace names MUST NOT be equal to
Helper
of any case (case-insensitive)
Class Like (Class, Interface, Trait)
-
Class like names MUST NOT be equal to or end in
DTO
of any case (case-insensitive) -
Class like names MUST NOT be equal to
Helper
of any case (case-insensitive) -
Class like names MUST NOT be equal to or start with any case (case-insensitive) of the namespace name it resides in
- Class like names MUST NOT end with their type name of any case (case-insensitive)
Class
- No non-final classes without children
Interface
- Interface names MUST NOT be prefixed with
I