Skip to content

ArnoCB/architecture-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architecture Standards

An extension with some additional PhpStan rules to help guard code standards.

While this package is in development, it can be installed as follows:

composer.json

"repositories":  [{
   "type": "vcs",
   "url": "https://github.com/arnocb/architecture-standards.git"
}],
"require-dev": {
   "arnocb/architecture-standards": "dev-main"
}

Allow the plugin to be installed with composer:

"allow-plugins": {
    "arnocb/architecture-standards": true,
    "phpstan/extension-installer": true
}

phpstan.neon

includes:
    - vendor/arnocb/architecture-standards/extension.neon

Rules

  • ForbidEmptyRule - Forbid empty statements
  • ForbidIsNullRule - Forbid is_null() checks
  • ForbidElvisRule - Forbid elvis operators
  • ArchitectureRules - Forbid methods in the Controller that don't give a response
  • Forbid responses in non-Controller / non-Middleware classes

Flag settings

parameters:
    architectureRules:
        allRules: true|false
        forbidEmpty:  true|false
        forbidIsNull: true|false
        forbidElvis: true|false
        architectureRules:  true|false

Extra development information

About

An extension with some additional phpstan rules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages