Showing 143 of 143 total issues
StringUtils
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class StringUtils extends Object {
private static $SEPARATOR_LIST = [
'|',
':',
'.',
- Create a ticketCreate a ticket
Crate
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Crate extends Object implements ICrate {
/**
* @var ISchema
*/
protected $schema;
- Create a ticketCreate a ticket
AbstractNode
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractNode extends Object implements IAbstractNode {
/**
* @var IAbstractNode
*/
protected $parent;
- Create a ticketCreate a ticket
Method parseTag
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseTag(IIterator $iterator, IXmlHandler $xmlHandler) {
$last = null;
$name = '';
$attributeList = [];
$type = self::XML_TYPE_WARP;
- Create a ticketCreate a ticket
Function node
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function node(INode $node, \Iterator $iterator, ...$parameters) {
$level = $node->getLevel();
$stack = new \SplStack();
/**
* @var $levelTreeTraversal ITreeTraversal
- 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 parse
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function parse($query) {
$query = str_replace('//', '/*/', $query);
$query = '/' . trim($query, '/') . '/';
$filter = new \stdClass();
$filter->fixed = strpos($query, '**') === false && strpos($query, '?*') === false;
- 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
Property
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class Property extends Object implements IProperty {
/**
* @var ISchema
*/
protected $schema;
- Create a ticketCreate a ticket
Function execute
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function execute(): IResponse {
if ($this->curl === null) {
throw new ClientException(sprintf('Cannot execute handler for the url [%s] more than once.', (string)$this->request->getRequestUrl()));
}
$options = [];
- 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 node
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function node(\Iterator $iterator) {
$stack = new \SplStack();
$level = -1;
/** @var $node INode */
foreach ($iterator as $node) {
- 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
File AbstractStaticQueryFactory.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Edde\Common\Query;
- Create a ticketCreate a ticket
Function parseAttribute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function parseAttribute(IIterator $iterator) {
$name = null;
$open = false;
$quote = null;
$value = null;
- 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
Schema
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Schema extends Object implements ISchema {
/**
* @var string
*/
protected $name;
- Create a ticketCreate a ticket
Method node
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
static public function node(INode $root, $source): INode {
$callback = null;
if (is_array($source) === false && is_object($source) === false) {
throw new NodeException('Source must be array or stdClass object.');
}
- Create a ticketCreate a ticket
Function handleSetup
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function handleSetup() {
parent::handleSetup();
if (empty($this->schemaLoaderList)) {
throw new SchemaManagerException(sprintf('There are no schema loaders in [%s].', static::class));
}
- 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 load
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function load(ICrate $crate, array $source) {
$schema = $crate->getSchema();
foreach ($source as $property => $value) {
if ($schema->hasCollection($property = (string)$property)) {
$schemaCollection = $schema->getCollection($property);
- 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 accept
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
static public function accept(string $accept = null): array {
if ($accept === null) {
return ['*/*'];
}
$accepts = [];
- Create a ticketCreate a ticket
Method parse
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parse($query) {
$query = str_replace('//', '/*/', $query);
$query = '/' . trim($query, '/') . '/';
$filter = new \stdClass();
$filter->fixed = strpos($query, '**') === false && strpos($query, '?*') === false;
- Create a ticketCreate a ticket
Function getMethodReflection
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
static public function getMethodReflection($callback) {
if (is_string($callback) && class_exists($callback)) {
$reflectionClass = self::getReflectionClass($callback);
if ($constructor = $reflectionClass->getConstructor()) {
return $constructor;
- 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 compile
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compile(IResourceList $resourceList = null): IFile {
$content = [];
$pathList = [];
$resourceList = $resourceList ?: $this;
$cache = $this->cache();
- Create a ticketCreate a ticket
Method parseAttribute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseAttribute(IIterator $iterator) {
$name = null;
$open = false;
$quote = null;
$value = null;
- Create a ticketCreate a ticket