mwx/ecs-fixers

metaworx custom php-cs-fixer fixers: control-structure braces, extends/implements wrapping, section comments, ternary formatting

dev-master 2026-08-27 10:09 UTC

This package is auto-updated.

Last update: 2026-08-27 10:35:20 UTC


README

Custom php-cs-fixer fixers implementing the metaworx code style. Owns the mwx\CS\ namespace prefix.

Contents

ComponentPurpose
ControlStructureBraceFixerAllman-style brace and newline placement for control structures
ClassExtendsImplementsWrappingFixerextends/implements clause wrapping
SectionCommentsFixer// constants / // properties section comment ordering
TernaryFixer + mwx\CS\Parser\*Ternary formatting backed by nikic/php-parser analysis
src/CS/Fixer/Spec/Executable spec fixtures (composer spec:check / spec:build)

The fixers are plain php-cs-fixer plugins; ECS is only a dev dependency for the test harness. The preset configuration wiring them up lives in mwx/coding-standard.

Development

composer install     # nested workspace: resolves mwx/lib from ../ via path repo
vendor/bin/phpunit   # 600+ tests (PHPUnit 11)

Install

Pre-publication: via the monorepo's path repository (see the repository root README). Later: composer require --dev mwx/ecs-fixers (usually indirectly via mwx/coding-standard).

MIT license.