UJM-dev / ExoBundle

A Claroline plugin to create exercises
Other
5 stars 12 forks source link

code format symfony standard #58

Closed pitrackster closed 9 years ago

pitrackster commented 9 years ago

code reformat

stefk commented 9 years ago

:+1:

stefk commented 9 years ago

@pitrackster, I think generated code like migration files should be excluded.

pitrackster commented 9 years ago

@stefk do you see other files/folder that should be ignored by the process ?

stefk commented 9 years ago

@pitrackster, no.

pitrackster commented 9 years ago

So we should exclude Migrations directory from the fixer. It seems that the best way to do that is to create a .php_cs file in the root of the bundle and put something like below in it :

<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
    ->exclude('Migrations')
    ->in(__DIR__)
;

return Symfony\CS\Config\Config::create()
    ->finder($finder)
;

After that you can run the command with the --config-file parameter.

I'll revert the migration files to the previous state, add the config file and push again. It's ok for you ?

stefk commented 9 years ago

The config file is a good idea. While you're at it, you can also add php-cs-fixer to the dev dependencies ;)