mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,13 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class AppKernel extends Kernel
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCacheDir()
|
||||
{
|
||||
return sys_get_temp_dir() . '/ActivityBundle/cache';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLogDir()
|
||||
{
|
||||
return sys_get_temp_dir() . '/ActivityBundle/logs';
|
||||
}
|
||||
|
||||
public function registerBundles()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new Chill\CustomFieldsBundle\ChillCustomFieldsBundle(),
|
||||
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||
@@ -20,28 +43,12 @@ class AppKernel extends Kernel
|
||||
new \Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
|
||||
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||
new Symfony\Bundle\MonologBundle\MonologBundle(),
|
||||
#add here all the required bundle (some bundle are not required)
|
||||
);
|
||||
//add here all the required bundle (some bundle are not required)
|
||||
];
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCacheDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/ActivityBundle/cache';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLogDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/ActivityBundle/logs';
|
||||
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
|
||||
/** @var ClassLoader $loader */
|
||||
$loader = require __DIR__.'/../../../../../vendor/autoload.php';
|
||||
$loader = require __DIR__ . '/../../../../../vendor/autoload.php';
|
||||
|
||||
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
|
||||
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||
|
||||
return $loader;
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Component\Debug\Debug;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
@@ -11,16 +18,17 @@ use Symfony\Component\Debug\Debug;
|
||||
// Feel free to remove this, extend it, or make something more sophisticated.
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')
|
||||
) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
||||
|
||||
exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
|
||||
}
|
||||
|
||||
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
|
||||
$loader = require_once __DIR__ . '/../app/bootstrap.php.cache';
|
||||
Debug::enable();
|
||||
|
||||
require_once __DIR__.'/../app/AppKernel.php';
|
||||
require_once __DIR__ . '/../app/AppKernel.php';
|
||||
|
||||
$kernel = new AppKernel('dev', true);
|
||||
$kernel->loadClassCache();
|
||||
|
Reference in New Issue
Block a user