Skip to content

Instantly share code, notes, and snippets.

@rogercbe
Created February 28, 2019 12:09
Show Gist options
  • Select an option

  • Save rogercbe/bba4d42caa121a5d9e34326e773cb634 to your computer and use it in GitHub Desktop.

Select an option

Save rogercbe/bba4d42caa121a5d9e34326e773cb634 to your computer and use it in GitHub Desktop.
<?php
$finder = \PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude(['bootstrap', 'storage', 'vendor'])
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'no_unused_imports' => true,
])
->setFinder($finder);
init:
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
#!/bin/sh
composer format
git add .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment