Showing 41 of 41 total issues
Kernel
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
final class Kernel implements \ArrayAccess
{
/**
* @var string
*/
Method getDefinitionTree
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getDefinitionTree()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('settings');
Form
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Form implements \IteratorAggregate, \Countable
{
/**
* @var string
*/
MySQLDriver
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class MySQLDriver extends AbstractDriver
{
/**
* The link identifier of the connection
*
Application
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
final class Application implements \ArrayAccess
{
/**
* @var \FlameCore\Infernum\Container
*/
File Kernel.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Infernum
* Copyright (C) 2015 IceFlame.net
*
Function execute
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function execute(array $parameters = null)
{
if (!empty($this->parameters)) {
$length = count($this->parameters);
- 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 locate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function locate($template)
{
$template = preg_replace('#/{2,}#', '/', strtr((string) $template, '\\', '/'));
if (strpos($template, "\0") !== false) {
- 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 locate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function locate($template)
{
$template = preg_replace('#/{2,}#', '/', strtr((string) $template, '\\', '/'));
if (strpos($template, "\0") !== false) {
Method getDefinitionTree
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getDefinitionTree()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('module');
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(array $parameters = null)
{
if (!empty($this->parameters)) {
$length = count($this->parameters);
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(Request $request, Application $app)
{
if (!$this->isReady()) {
throw new \LogicException('Kernel must be booted to handle requests.');
}
Function boot
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function boot(Request $request)
{
$this->domain = $request->server->get('SERVER_NAME');
$this->secure = $request->isSecure();
- 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 __construct
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(Site $site, Kernel $kernel)
{
$this->site = $site;
$this->kernel = $kernel;
Method boot
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function boot(Request $request)
{
$this->domain = $request->server->get('SERVER_NAME');
$this->secure = $request->isSecure();
Method getDefinitionTree
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getDefinitionTree()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('theme');
Function set
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function set($name, $data, $lifetime)
{
if (!$this->validateName($name)) {
throw new \InvalidArgumentException(sprintf('Given cache name "%s" is invalid.', $name));
}
- 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 log
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function log($severity, $message, array $context = [])
{
if (!$this->active) {
return true;
}
- 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 __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($identifier, DriverInterface $database)
{
$table = static::getTable();
$fields = static::getFields();
$columns = array_keys($fields);
Method parse
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse($path)
{
if (empty($path)) {
return false;
}