File FrontController.php
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the MVC-Fundamental package.
*
* Copyright (c) 2013-2016 Pierre Cassat <me@e-piwi.fr> and contributors
Function callRoute
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function callRoute($route, array $arguments = array(), $method = 'get')
{
$this->boot();
@list($callback, $params) = $this->get('router')->distribute(
- 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 callControllerAction
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function callControllerAction($controller = null, $action = null, array $arguments = array())
{
$this->boot();
$controller_name = $controller;
- 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
Method callRoute
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function callRoute($route, array $arguments = array(), $method = 'get')
{
$this->boot();
@list($callback, $params) = $this->get('router')->distribute(
Method callControllerAction
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function callControllerAction($controller = null, $action = null, array $arguments = array())
{
$this->boot();
$controller_name = $controller;
Function boot
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function boot()
{
if (!self::$_is_booted) {
if (empty($this->_options['temp_dir'])) {
$this->_options['temp_dir'] =
- 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
Method error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function error($message, $status = 500, $code = 0, $filename = __FILE__, $lineno = __LINE__)
Avoid too many return
statements within this method. Open
return $this->render($view_file, $arguments);