Showing 7 of 7 total issues
Application
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Application implements HttpKernelInterface, ExtendableInterface
{
/**
* @var bool
*/
Method initializeContainer
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initializeContainer(Application $application, array $extensions = array(), array $compilerPasses = array())
{
$container = $this->getContainerBuilder();
$container->addObjectResource($application);
$container->setParameter('app.env', $application->getEnvironment());
Method load
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load(array $config, ContainerBuilder $container)
{
$container->register('router.parser', 'FastRoute\RouteParser\Std');
$container->register('router.data_generator.strategy', 'FastRoute\DataGenerator\GroupCountBased');
$container->register('router.data_generator', 'Nice\Router\NamedDataGenerator\HandlerWrapperGenerator')
Function initializeContainer
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function initializeContainer(Application $application, array $extensions = array(), array $compilerPasses = array())
{
$container = $this->getContainerBuilder();
$container->addObjectResource($application);
$container->setParameter('app.env', $application->getEnvironment());
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getData
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getData()
{
$routes = $this->routeCollector->getData();
$data = array();
foreach ($routes[0] as $method => $paths) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function generate($name, array $parameters = array(), $absolute = false)
{
if (!$this->initialized) {
$this->initialize();
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parseDynamicGroup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function parseDynamicGroup($group)
{
$regex = $group['regex'];
$parts = explode('|', $regex);
$data = array();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"