2017 © Pedro Peláez
 

library php-cs-fixer-config

Prebuilt PHP CS Fixer configuration for Madewithlove projects

image

madewithlove/php-cs-fixer-config

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  • Saturday, June 16, 2018
  • by Anahkiasen
  • Repository
  • 4 Watchers
  • 3 Stars
  • 2,933 Installations
  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 17 Versions
  • 7 % Grown

The README.md


madewithlove

madewithlove PHP-CS-Fixer configuration

The default [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) configuration for madewithlove projects.

![ci](https://github.com/madewithlove/php-cs-fixer-config/actions/workflows/ci.yml/badge.svg) [![pull requests](https://img.shields.io/github/issues-pr/madewithlove/php-cs-fixer-config)](https://github.com/madewithlove/php-cs-fixer-config/pulls) [![contributors](https://img.shields.io/github/contributors/madewithlove/php-cs-fixer-config)](https://github.com/madewithlove/php-cs-fixer-config/graphs/contributors)
Built with :heart:︎ and :coffee: by heroes at madewithlove.

Installation

$ composer require madewithlove/php-cs-fixer-config --dev

Usage

Basic usage

.php-cs-fixer.php, (*1)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::fromFolders(['src']);

To exclude a subfolder:, (*2)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::fromFolders(['src'], null, ['ignoreThisDir']);

This will skip src/ignoreThisDir or src/foo/bar/ignoreThisDir. (_The folder has to be relative to the ones in the first argument._), (*3)

You can also override rules per-project without overriding the core rules like this:, (*4)

.php-cs-fixer.php, (*5)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::fromFolders(['src'])->mergeRules([
   'php_unit_strict' => false,
]);

Usage within a Laravel project

You can also preconfigure the configuration for a Laravel project by calling a special factory method:, (*6)

.php-cs-fixer.php, (*7)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::forLaravel();

If need be, you can also append folders to fix in addition to Laravel's:, (*8)

.php-cs-fixer.php, (*9)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::forLaravel(['some_other_folder']);

Targeting a specific PHP version

By default, the configuration will check the version of PHP you run the tool with, and proceed to enable/disable fixers depending on it., (*10)

You can override the target PHP version by passing it either as constructor argument, or as second argument to fromFolders:, (*11)

.php-cs-fixer.php, (*12)

<?php

require 'vendor/autoload.php';

return Madewithlove\PhpCsFixer\Config::fromFolders(['src'], '7.4');

// or

return Madewithlove\PhpCsFixer\Config::forLaravel([], '7.4');

The Versions

16/06 2018

dev-master

9999999-dev

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

16/06 2018

1.9.0

1.9.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

07/04 2018

1.8.0

1.8.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

09/12 2017

1.7.1

1.7.1.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

09/12 2017

1.7.0

1.7.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

27/08 2017

1.6.1

1.6.1.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

25/08 2017

1.6.0

1.6.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

23/07 2017

1.5.2

1.5.2.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

23/07 2017

1.5.1

1.5.1.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

23/07 2017

1.5.0

1.5.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

13/06 2017

1.4.2

1.4.2.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

12/06 2017

1.4.1

1.4.1.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

05/06 2017

1.4.0

1.4.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

15/04 2017

1.3.0

1.3.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

10/02 2017

1.2.0

1.2.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

10/02 2017

1.1.0

1.1.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove

10/02 2017

1.0.0

1.0.0.0

Prebuilt PHP CS Fixer configuration for Madewithlove projects

  Sources   Download

MIT

The Requires

 

by Madewithlove