Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.
/ code-style-configs Public archive

Ready to use config wrappers for easy-coding-standard and rector code style fixers.

Notifications You must be signed in to change notification settings

mlencki/code-style-configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Code Style Configs

Ready to use config wrappers for easy-coding-standard and rector code style fixers.

Installation

Using composer:

composer require mlencki/code-style-configs --dev

Usage

Simplest ecs.php configuration file example:

<?php

declare(strict_types=1);

use MLencki\CodeStyle\EasyCodingStandard\Config;

$config = new Config();
$config->scanPaths(['src', 'tests']);

return $config->get();

The same for rector.php:

<?php

declare(strict_types=1);

use MLencki\CodeStyle\Rector\Config;
use Rector\Core\Configuration\Option;

$config = new Config();
$config->scanPaths(['src', 'tests']);
$config->setOption(Option::AUTOLOAD_PATHS, ['tests']);

return $config->get();

Local development

Install composer dependencies:

docker-compose run php composer install

Running code style checks:

docker-compose run php composer ecs

Running tests:

docker-compose run php composer tests

About

Ready to use config wrappers for easy-coding-standard and rector code style fixers.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages