Download the PHP package pedrotroller/php-cs-custom-fixer without Composer
On this page you can find all versions of the php package pedrotroller/php-cs-custom-fixer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pedrotroller/php-cs-custom-fixer
More information about pedrotroller/php-cs-custom-fixer
Files in pedrotroller/php-cs-custom-fixer
Package php-cs-custom-fixer
Short Description PHP-CS-FIXER : my custom fixers
License MIT
Informations about the package php-cs-custom-fixer
PHP-CS-FIXER : Custom fixers
Installation
Configuration
Fixers
PedroTroller/order_behat_steps
Step definition methods in Behat contexts MUST BE ordered by annotation and method name.
Available options
instanceof(optional): Parent class or interface of your behat context classes.- default:
Behat\Behat\Context\Context
- default:
Configuration examples
OR using my rule list builder.
Fixes
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/ordered_with_getter_and_setter_first
Class/interface/trait methods MUST BE ordered (accessors at the beginning of the class, ordered following properties order).
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/exceptions_punctuation
Exception messages MUST ends by ".", "…", "?" or "!".
Risky: will change the exception message.
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/forbidden_functions
Prohibited functions MUST BE commented on as prohibited
Available options
-
comment(optional): The prohibition message to put in the comment- default:
@TODO remove this line
- default:
functions(optional): The function names to be marked how prohibited- default:
var_dump,dump,die
- default:
Configuration examples
OR using my rule list builder.
Fixes
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/line_break_between_method_arguments
If the declaration of a method is too long, the arguments of this method MUST BE separated (one argument per line)
Available options
-
automatic-argument-merge(optional): If both conditions are met (the line is not too long and there are not too many arguments), then the arguments are put back inline- default:
true
- default:
-
force-for-construct(optional): If true, the __construct method arguments will always be split into several lines- default:
false
- default:
-
inline-attributes(optional): In the case of a split, the declaration of the attributes of the arguments of the method will be on the same line as the arguments themselves- default:
false
- default:
-
max-args(optional): The maximum number of arguments allowed with splitting the arguments into several lines (usefalseto disable this feature)- default:
3
- default:
max-length(optional): The maximum number of characters allowed with splitting the arguments into several lines- default:
120
- default:
Configuration examples
OR using my rule list builder.
Fixes
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/line_break_between_statements
Each statement (in, for, foreach, ...) MUST BE separated by an empty line
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/comment_line_to_phpdoc_block
Classy elements (method, property, ...) comments MUST BE a PhpDoc block
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/useless_code_after_return
All return that are not accessible (i.e. following another return) MUST BE deleted
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/doctrine_migrations
Unnecessary empty methods (getDescription(), up(), down()) and comments MUST BE removed from Doctrine migrations
Available options
instanceof(optional): The parent class of which Doctrine migrations extend- default:
Doctrine\Migrations\AbstractMigration
- default:
Configuration examples
OR using my rule list builder.
Fixes
Configuration examples
OR using my rule list builder.
Fixes
PedroTroller/phpspec
Phpspec scenario functions MUST NOT have a return type declaration.
Phpspec scenario functions MUST NOT have a scope.
The methods of the phpspec specification classes MUST BE sorted (let, letGo, its*, it*, getMatchers and the rest of the methods)
Lambda functions MUST NOT have a static scope.
Available options
instanceof(optional): Parent classes of your spec classes.- default:
PhpSpec\ObjectBehavior
- default:
Configuration examples
OR using my rule list builder.
Fixes
Configuration examples
OR using my rule list builder.
Fixes
Contributions
Before to create a pull request to submit your contributon, you must:
- run tests and be sure nothing is broken
- rebuilt the documentation
How to run tests
How to rebuild the documentation
Development with Docker
No local PHP is needed: everything runs in Docker through make. Requirements: Docker with Compose, and GNU make.
Run make to list the available commands:
make test and make stan run in an image that contains the code and its dependencies, rebuilt on each call. The other commands work on your working copy, always on the minimum supported PHP version. That version is set once, in .env.
vendor/ is installed on your machine the first time, then again whenever composer.json changes. There is no lock file, so it can fall behind what CI resolves: make readme-check FRESH=1 (or rm -rf vendor) resolves the dependencies again before the check.
README.md is generated: edit bin/doc.twig, then run make readme.
Updating the minimum PHP version
The minimum PHP version follows the oldest PHP version php.net still supports, and CI fails when it falls behind. To update it:
- Fork the repository and clone your fork.
- Run
make update-php: it reads the supported versions from php.net, updatesPHP_MIN_VERSIONin.envand thephpconstraint incomposer.json, then runsmake fix,make readmeandmake test. - If
git statusshows changes, commit them and open a pull request with afeat:title (for examplefeat: drop support of php 8.2). If nothing changed, the minimum PHP version is already up to date.
