Showing 10 of 40 total issues
Function checkAsset
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function checkAsset($loader)
{
//The plugin name as it appears on the servers file path
$plugin = $this->getPlugin(true);
- Read upRead up
- Create a ticketCreate a ticket
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 __construct
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($loader, $router, $theme, $view, $render = true) {
$this->Loader = $loader;
$this->Router = $router;
$this->Theme = $theme;
- Create a ticketCreate a ticket
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function render($view)
{
$file = null;
$theme = $this->getTheme();
$layout = $this->getLayout();
- Read upRead up
- Create a ticketCreate a ticket
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 setViewPath
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setViewPath()
{
$plugin = $this->Router->getPlugin(true);
$controller = $this->Router->getController();
$action = $this->Router->getAction();
- Read upRead up
- Create a ticketCreate a ticket
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 render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($view)
{
$file = null;
$theme = $this->getTheme();
$layout = $this->getLayout();
- Create a ticketCreate a ticket
Method parseUri
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseUri($requestUri)
{
//Parse each URI segment into it's own element then remove all elements
//with an empty value.
$uriSegments = array_filter(explode('/', $requestUri));
- Create a ticketCreate a ticket
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($loader, $router, $theme, $view, $render = true) {
$this->Loader = $loader;
$this->Router = $router;
$this->Theme = $theme;
- Read upRead up
- Create a ticketCreate a ticket
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 __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($loader, $router, $theme, $view, $render = true) {
- Create a ticketCreate a ticket
Function fetchAsset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function fetchAsset($asset)
{
//If the request is a real file from the requested plugin
if (is_file($asset)) {
- Read upRead up
- Create a ticketCreate a ticket
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 parseUri
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function parseUri($requestUri)
{
//Parse each URI segment into it's own element then remove all elements
//with an empty value.
$uriSegments = array_filter(explode('/', $requestUri));
- Read upRead up
- Create a ticketCreate a ticket
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"