Passed
Pull Request — master (#2028)
by Gabriel
64:14
created

Kernel::configureContainer()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 8
rs 10
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Frontend\App;
6
7
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
8
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
9
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
10
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
11
12
class Kernel extends BaseKernel {
13
14
	use MicroKernelTrait;
0 ignored issues
show
Bug introduced by
The trait Symfony\Bundle\Framework...Kernel\MicroKernelTrait requires the property $instanceof which is not provided by WMDE\Fundraising\Frontend\App\Kernel.
Loading history...
15
16
	protected function configureContainer(ContainerConfigurator $container): void
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
Coding Style introduced by
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
17
	{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
18
		$container->import('../config/{packages}/*.yaml');
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
19
		$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
Coding Style introduced by
Concat operator must be surrounded by a single space
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
20
21
		if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
Coding Style introduced by
Concat operator must be surrounded by a single space
Loading history...
22
			$container->import('../config/services.yaml');
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
23
			$container->import('../config/{services}_'.$this->environment.'.yaml');
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
Coding Style introduced by
Concat operator must be surrounded by a single space
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
24
		}
25
	}
26
27
	protected function configureRoutes(RoutingConfigurator $routes): void
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after opening parenthesis; 0 found
Loading history...
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
Coding Style introduced by
Expected 1 spaces before closing parenthesis; 0 found
Loading history...
28
	{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
29
		$routes->import('../config/routes.yaml');
0 ignored issues
show
introduced by
Single space expected after opening parenthesis
Loading history...
introduced by
Single space expected before closing parenthesis
Loading history...
30
	}
31
}
32