2017 © Pedro Peláez
 

library psr2r-fixer

image

fig-r/psr2r-fixer

  • Sunday, February 5, 2017
  • by burzum
  • Repository
  • 1 Watchers
  • 2 Stars
  • 76 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PSR-2-R Fixer

Build Status Minimum PHP Version License Total Downloads Coding Standards, (*1)

For details on PSR-2-R see fig-rectified-standards., (*2)

Full documentation @ /docs/., (*3)

Deprecated

This tool is not used/maintained anymore. Please use the sniffer which can both detect and fix cs issues as well as tokenize PHP files., (*4)

PHP-CS-FIXER Fixers

This uses FriendsOfPHP/PHP-CS-Fixer. It can detect and fix some issues automatically and is ideal for integration into the IDE., (*5)

Configuration

You can use PSR-2-R by default. Create your own .phpcs configuration in the root directory of your project. You can copy-and-paste this one and adjust the path to the psr2r standard definition:, (*6)

$finder = Symfony\CS\Finder\DefaultFinder::create()
    ->in(__DIR__)
    ->exclude('bin')
    ->exclude('vendor') // add anything you want to omit
;

return require_once('vendor/fig-r/psr2r-fixer/.php_cs_psr2r');

In case you want to further modify it assign it to a variable and then you can continue to work on the returned object, before finally returning it., (*7)

Usage

You can now run it from your root directory as, (*8)

vendor/bin/php-cs-fixer fix

It will automatically pull your config (confirm that by looking for that info in the first line when starting the fixer)., (*9)

Of course you can also use any of the custom fixers in this repo in your config, or extend/modify them as you like., (*10)

...
->finder($finder)
->addCustomFixer(new \Psr2rFixer\Fixer\NoSpacesCastFixer())
...

License

MIT, (*11)

The Versions

05/02 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires