Ready to use config wrappers for easy-coding-standard and rector code style fixers.
Using composer:
composer require mlencki/code-style-configs --devSimplest ecs.php configuration file example:
<?phpdeclare(strict_types=1);
useMLencki\CodeStyle\EasyCodingStandard\Config;
$config = newConfig();
$config->scanPaths(['src', 'tests']);
return$config->get();The same for rector.php:
<?phpdeclare(strict_types=1);
useMLencki\CodeStyle\Rector\Config;
useRector\Core\Configuration\Option;
$config = newConfig();
$config->scanPaths(['src', 'tests']);
$config->setOption(Option::AUTOLOAD_PATHS, ['tests']);
return$config->get();Install composer dependencies:
docker-compose run php composer installRunning code style checks:
docker-compose run php composer ecsRunning tests:
docker-compose run php composer tests