* use php-cs-fixer instead of phpcodesniffer * updated scrutinizer config * adjusted code yules to all files * updated CONTRIBUTING guidelines
This commit is contained in:
@@ -23,16 +23,16 @@ class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
const CONFIG_EXTS = '.{php,xml,yaml,yml}';
|
||||
public const CONFIG_EXTS = '.{php,xml,yaml,yml}';
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
return $this->getProjectDir().'/var/cache/'.$this->environment;
|
||||
return $this->getProjectDir() . '/var/cache/' . $this->environment;
|
||||
}
|
||||
|
||||
public function getLogDir()
|
||||
{
|
||||
return $this->getProjectDir().'/var/log';
|
||||
return $this->getProjectDir() . '/var/log';
|
||||
}
|
||||
|
||||
protected function build(ContainerBuilder $container)
|
||||
@@ -42,7 +42,7 @@ class Kernel extends BaseKernel
|
||||
|
||||
public function registerBundles()
|
||||
{
|
||||
$contents = require $this->getProjectDir().'/config/bundles.php';
|
||||
$contents = require $this->getProjectDir() . '/config/bundles.php';
|
||||
foreach ($contents as $class => $envs) {
|
||||
if (isset($envs['all']) || isset($envs[$this->environment])) {
|
||||
yield new $class();
|
||||
@@ -56,27 +56,27 @@ class Kernel extends BaseKernel
|
||||
|
||||
$container->setParameter('container.autowiring.strict_mode', true);
|
||||
$container->setParameter('container.dumper.inline_class_loader', true);
|
||||
$confDir = $this->getProjectDir().'/config';
|
||||
$loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob');
|
||||
if (is_dir($confDir.'/packages/'.$this->environment)) {
|
||||
$loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
|
||||
$confDir = $this->getProjectDir() . '/config';
|
||||
$loader->load($confDir . '/packages/*' . self::CONFIG_EXTS, 'glob');
|
||||
if (is_dir($confDir . '/packages/' . $this->environment)) {
|
||||
$loader->load($confDir . '/packages/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob');
|
||||
}
|
||||
$loader->load($confDir.'/packages/local'.self::CONFIG_EXTS, 'glob');
|
||||
$loader->load($confDir.'/services'.self::CONFIG_EXTS, 'glob');
|
||||
$loader->load($confDir.'/services_'.$this->environment.self::CONFIG_EXTS, 'glob');
|
||||
$loader->load($confDir . '/packages/local' . self::CONFIG_EXTS, 'glob');
|
||||
$loader->load($confDir . '/services' . self::CONFIG_EXTS, 'glob');
|
||||
$loader->load($confDir . '/services_' . $this->environment . self::CONFIG_EXTS, 'glob');
|
||||
|
||||
$container->addCompilerPass(new DoctrineCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1000);
|
||||
}
|
||||
|
||||
protected function configureRoutes(RouteCollectionBuilder $routes)
|
||||
{
|
||||
$confDir = $this->getProjectDir().'/config';
|
||||
if (is_dir($confDir.'/routes/')) {
|
||||
$routes->import($confDir.'/routes/*'.self::CONFIG_EXTS, '/', 'glob');
|
||||
$confDir = $this->getProjectDir() . '/config';
|
||||
if (is_dir($confDir . '/routes/')) {
|
||||
$routes->import($confDir . '/routes/*' . self::CONFIG_EXTS, '/', 'glob');
|
||||
}
|
||||
if (is_dir($confDir.'/routes/'.$this->environment)) {
|
||||
$routes->import($confDir.'/routes/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
|
||||
if (is_dir($confDir . '/routes/' . $this->environment)) {
|
||||
$routes->import($confDir . '/routes/' . $this->environment . '/**/*' . self::CONFIG_EXTS, '/', 'glob');
|
||||
}
|
||||
$routes->import($confDir.'/routes'.self::CONFIG_EXTS, '/', 'glob');
|
||||
$routes->import($confDir . '/routes' . self::CONFIG_EXTS, '/', 'glob');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user