2017 © Pedro Peláez
 

library cs-fixer

php-cs-fixer with github hook and config

image

rabbitinternet/cs-fixer

php-cs-fixer with github hook and config

  • Friday, December 8, 2017
  • by rabbitinternet
  • Repository
  • 4 Watchers
  • 0 Stars
  • 1,169 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 8 % Grown

The README.md

PHP Coding standard fixer

This package is based on https://github.com/FriendsOfPHP/PHP-CS-Fixer with addition of git pre-commit hook installation., (*1)

The hook will prevent the commit if the code does not comply with the coding standard rules, (*2)

Default set of rules that are fully extendable, (*3)

Installation

Require a package

composer require --dev rabbitinternet/cs-fixer

Add composer init-hook command

"scripts": {
    "init-hook": "composer run-script post-install-cmd -d ./vendor/rabbitinternet/cs-fixer"
}

Install the git hook

composer run-script init-hook

Manual Usage

vendor/bin/cs-fixer help

Note: Composer can install the binaries in custom dir instead of vendor/bin/ (sylius installs in bin/), (*4)

Rules configuration

To override default rules add .php_cs_rules.php file in the root of the project, (*5)

<?php

return [
    'finder' => [
        'exclude' => [
            'var'
        ],
        'notName' => [
           'autoload.php',
        ],
    'fixer' => [
        'single_blank_line_at_eof' => true
    ]
]

Changelog

The Versions

08/12 2017

dev-master

9999999-dev

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

14/11 2017

v1.3.1

1.3.1.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

20/07 2017

v1.3

1.3.0.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

01/06 2017

v1.2.0

1.2.0.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

30/05 2017

v1.1.2

1.1.2.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

29/05 2017

v1.1.1

1.1.1.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

29/05 2017

v1.1

1.1.0.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic

29/05 2017

v1.0.0

1.0.0.0

php-cs-fixer with github hook and config

  Sources   Download

The Requires

 

by Aleksandar Markicevic