Skip to content

About

๐Ÿ‘” DressCode: checks and fixes PHP coding style, and upgrades code to newer PHP and to new versions of libraries. Built on a lossless syntax tree, so it changes only what it touches. PER-CS, PSR-12, Symfony, Nette.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DressCode

DressCode is a checker and fixer of PHP code style built on a lossless syntax tree: every token, whitespace and comment of a source file is kept, rules edit the tree and the printer reproduces the file byte for byte.

This repository is the distribution of DressCode: a phar with every dependency inside, so that composer require adds nothing to the dependencies of your project. Development happens in dg/dresscode, where the issues and the documentation are; the phar here is built from its tags.

Status: in development. Nothing is usable yet; the API, names and behavior are all subject to change.

Installation

composer require --dev dresscode/dresscode

Requires PHP 8.4 or newer with the phar extension. Then:

vendor/bin/dresscode check
vendor/bin/dresscode fix

Without Composer, download dresscode.phar from the releases, verify its signature and run it with php dresscode.phar.

Plugins

A rule, preset or analysis of your own is written against the API of DressCode and PhpSyntax. This package makes those classes available to your code: the bootstrap.php it autoloads serves DressCode\, PhpSyntax\ and the two libraries the API is made of (Nette\Schema, PHPStan\PhpDocParser) from the phar, and nothing else.

About

๐Ÿ‘” DressCode: checks and fixes PHP coding style, and upgrades code to newer PHP and to new versions of libraries. Built on a lossless syntax tree, so it changes only what it touches. PER-CS, PSR-12, Symfony, Nette.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages