2017-08-29 14:50:31 +00:00
|
|
|
<?php
|
2017-11-17 01:23:18 +00:00
|
|
|
/** @license MIT
|
|
|
|
* Copyright 2017 J. King, Dustin Wilson et al.
|
|
|
|
* See LICENSE and AUTHORS files for details */
|
|
|
|
|
2017-08-29 14:50:31 +00:00
|
|
|
namespace JKingWeb\Arsse;
|
|
|
|
|
2017-10-20 22:41:21 +00:00
|
|
|
const BASE = __DIR__.DIRECTORY_SEPARATOR;
|
2017-08-29 14:50:31 +00:00
|
|
|
|
|
|
|
$paths = [
|
|
|
|
__FILE__,
|
|
|
|
BASE."arsse.php",
|
|
|
|
BASE."lib",
|
|
|
|
BASE."tests",
|
|
|
|
];
|
|
|
|
$rules = [
|
|
|
|
'@PSR2' => true,
|
|
|
|
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
|
|
|
|
];
|
|
|
|
|
|
|
|
$finder = \PhpCsFixer\Finder::create();
|
|
|
|
foreach ($paths as $path) {
|
|
|
|
if (is_file($path)) {
|
2017-08-29 15:16:37 +00:00
|
|
|
$finder = $finder->append([$path]);
|
2017-08-29 14:50:31 +00:00
|
|
|
} else {
|
|
|
|
$finder = $finder->in($path);
|
|
|
|
}
|
|
|
|
}
|
2017-08-29 15:16:37 +00:00
|
|
|
return \PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder);
|