[feature/dic] Coding style: Braces

PHPBB3-10739
This commit is contained in:
Igor Wiedler 2012-08-25 16:43:41 +02:00
parent 7e44ca4d49
commit 4feb9aa8d7
5 changed files with 12 additions and 6 deletions

View file

@ -102,7 +102,8 @@ $phpbb_class_loader = $phpbb_container->get('class_loader');
$phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext'); $phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext');
$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); $ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor'));
foreach ($ids as $id) { foreach ($ids as $id)
{
$processor = $phpbb_container->get($id); $processor = $phpbb_container->get($id);
$processor->process($phpbb_container); $processor->process($phpbb_container);
} }

View file

@ -62,7 +62,8 @@ if (isset($_GET['avatar']))
$phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext'); $phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext');
$ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor')); $ids = array_keys($phpbb_container->findTaggedServiceIds('container.processor'));
foreach ($ids as $id) { foreach ($ids as $id)
{
$processor = $phpbb_container->get($id); $processor = $phpbb_container->get($id);
$processor->process($phpbb_container); $processor->process($phpbb_container);
} }

View file

@ -46,7 +46,8 @@ class phpbb_cron_task_provider implements IteratorAggregate
foreach ($definitions as $name => $definition) foreach ($definitions as $name => $definition)
{ {
$task = $this->container->get($name); $task = $this->container->get($name);
if ($task instanceof phpbb_cron_task_base) { if ($task instanceof phpbb_cron_task_base)
{
$task->set_name($name); $task->set_name($name);
} }

View file

@ -52,7 +52,8 @@ class phpbb_di_processor_config implements phpbb_di_processor_interface
protected function fix_acm_type($acm_type) protected function fix_acm_type($acm_type)
{ {
if (preg_match('#^[a-z]+$#', $acm_type)) { if (preg_match('#^[a-z]+$#', $acm_type))
{
return 'phpbb_cache_driver_'.$acm_type; return 'phpbb_cache_driver_'.$acm_type;
} }

View file

@ -31,8 +31,10 @@ class phpbb_di_processor_ext implements phpbb_di_processor_interface
public function process(ContainerBuilder $container) public function process(ContainerBuilder $container)
{ {
$enabled_exts = $this->extension_manager->all_enabled(); $enabled_exts = $this->extension_manager->all_enabled();
foreach ($enabled_exts as $name => $path) { foreach ($enabled_exts as $name => $path)
if (file_exists($path . '/config/services.yml')) { {
if (file_exists($path . '/config/services.yml'))
{
$loader = new YamlFileLoader($container, new FileLocator($path . '/config')); $loader = new YamlFileLoader($container, new FileLocator($path . '/config'));
$loader->load('services.yml'); $loader->load('services.yml');
} }