Download the PHP package orrison/meliorstan without Composer

On this page you can find all versions of the php package orrison/meliorstan. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package meliorstan

# MeliorStan **Advanced PHPStan Rules for Code Quality and Consistency** *Enhance your PHP codebase with intelligent static analysis rules that detect code smells, enforce naming conventions, and promote best practices.* [![Latest Stable Version](https://poser.pugx.org/orrison/meliorstan/v/stable)](https://packagist.org/packages/orrison/meliorstan) [![Total Downloads](https://poser.pugx.org/orrison/meliorstan/downloads)](https://packagist.org/packages/orrison/meliorstan/stats) [![License](https://poser.pugx.org/Orrison/MeliorStan/license)](https://choosealicense.com/licenses/mit/) [![PHP Version](https://img.shields.io/badge/PHP-8.3+-blue.svg)](https://php.net/) [![PHPStan](https://img.shields.io/badge/PHPStan-2.1+-orange.svg)](https://phpstan.org/)

Table of Contents

Features

Configuration and Usage

Install the package:

MeliorStan does not auto-register any rules. Including vendor/orrison/meliorstan/config/extension.neon only loads the parameter schemas and config services that the rules need. There is no phpstan/extension-installer integration, so every rule you want to run must be listed explicitly under rules: in your PHPStan config. This is intentional: each rule is opt-in so you can pick only the ones that fit your project.

A minimal phpstan.neon enabling and configuring two rules looks like this:

Add or remove entries under rules: to control which checks run. Each rule's available options, defaults, and behavior are documented on its own page, linked from Available Rules below.

Available Rules

Naming Conventions

Rule Description Target
BooleanGetMethodName Prevents get* methods from returning boolean values Methods
CamelCaseMethodName Enforces camelCase for method names Methods
CamelCaseParameterName Enforces camelCase for parameter names Parameters
CamelCasePropertyName Enforces camelCase for property names Properties
CamelCaseVariableName Enforces camelCase for variable names Variables
ConstantNamingConventions Enforces UPPERCASE for constants Constants
ConstructorWithNameAsEnclosingClass Prevents methods with same name as their class Methods
LongClassName Limits class/interface/trait/enum name length Classes, Interfaces, Traits, Enums
PascalCaseClassName Enforces PascalCase for class names Classes
ShortClassName Enforces minimum class/interface/trait/enum name length Classes, Interfaces, Traits, Enums
TraitConstantNamingConventions Enforces UPPERCASE for trait constants Trait Constants

Code Quality

Rule Description Target
BooleanArgumentFlag Detects boolean parameters in functions and methods that may indicate multiple responsibilities Methods, Functions, Closures
LongVariable Limits variable name length Variables
MissingClosureParameterTypehint Requires type hints on closure parameters Closures
MissingImport Detects types referenced by fully qualified name instead of being imported with a use statement Type-reference positions
ShortMethodName Enforces minimum method name length Methods
ShortVariable Enforces minimum variable name length Variables
ForbidPestPhpOnly Prevents committed Pest tests from using the only() filter Tests
Superglobals Discourages use of PHP superglobals Superglobal Usage
UnusedFormalParameter Detects function/method/closure parameters that are declared but never used Function/method/closure parameters
UnusedLocalVariable Detects local variables assigned but never read inside a function/method/closure Local Variables

Control Flow

Rule Description Target
ElseExpression Discourages else expressions Control Flow
IfStatementAssignment Detects assignments inside if and elseif conditions Control Flow

Design

Rule Description Target
DevelopmentCodeFragment Detects calls to development/debug functions like var_dump, print_r, etc. Function Calls
EmptyCatchBlock Detects and reports empty catch blocks in exception handling Catch Blocks
ErrorControlOperator Detects use of the error control operator (@), which silently suppresses errors instead of handling them properly Error Suppression
ForbidCountInLoopExpressions Detects usage of count() or sizeof() in loop conditions Loop Conditions
ForbidEvalExpressions Detects and reports usage of eval expressions Eval Expressions
ForbidExitExpressions Detects and reports usage of exit and die expressions Exit Expressions
ForbidGotoStatements Detects and reports usage of goto statements Goto Statements
CouplingBetweenObjects Detects classes with too many type dependencies Classes, Interfaces, Traits, Enums
DepthOfInheritance Detects classes with excessively deep inheritance chains Classes
ExcessiveClassLength Detects classes, interfaces, traits, and enums with excessive line counts Classes, Interfaces, Traits, Enums
ExcessiveMethodLength Detects methods, functions, and closures with excessive line counts Methods, Functions, Closures
ExcessiveClassComplexity Detects classes with excessive total cyclomatic complexity (Weighted Method Count) Classes, Interfaces, Traits, Enums
ExcessiveParameterList Detects functions, methods, closures, and arrow functions with too many parameters Functions, Methods, Closures, Arrow Functions
ExcessivePublicCount Detects classes with an excessive public API surface (public methods + properties) Classes, Interfaces, Traits, Enums
CyclomaticComplexity Detects methods, functions, and classes with high cyclomatic complexity Methods, Functions, Classes
NpathComplexity Detects methods and functions with high NPath complexity (number of acyclic execution paths) Methods, Functions
CognitiveComplexity Detects methods, functions, and classes with high Cognitive Complexity, the SonarSource understandability metric with a nesting penalty Methods, Functions, Classes
NumberOfChildren Detects classes with too many direct child classes Class Hierarchy
StaticAccess Detects static method calls and optionally static property access that create tight coupling Static Access
TooManyFields Detects classes and traits with an excessive number of instance fields Classes, Traits
TooManyMethods Detects classes with too many methods Classes, Interfaces, Traits, Enums
TooManyPublicMethods Detects classes with too many public methods Classes, Interfaces, Traits, Enums

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

AI Disclosure

AI assistants (Claude and similar tools) are used variably in the development and maintenance of this project, including for research, planning, drafting documentation, and at times generating or refactoring code. A significant portion of the code is still written by hand, and all code, tests, and documentation are reviewed, edited, and approved by human maintainers and contributors before being committed or released. The maintainers and contributors are the authors of, and are fully accountable for, everything in this repository. If you find a bug or quality issue, treat it as a project issue and report it normally; AI involvement is never an excuse.

Acknowledgments


[Documentation](docs/) • [Report Issues](https://github.com/orrison/meliorstan/issues)

All versions of meliorstan with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
phpstan/phpstan Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orrison/meliorstan contains the following files

Loading the files please wait ...