Showing 129 of 129 total issues
Method rightJoin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function rightJoin(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface
Method compare
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function compare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface
Method rightJoin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function rightJoin(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface;
Method addBetween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function addBetween(string $join, bool $positive, $identifier, $min, $max): void
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(int $elapsedTime, int $memoryChange, int $memoryPeak, int $memorySystemPeak, string $title = 'Result')
Method compare
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function compare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface;
Method orCompare
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function orCompare($left, string $operator, $right, string $leftType = self::TYPE_IDENTIFIER, string $rightType = self::TYPE_VALUE): WhereInterface;
Method join
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function join(RepositoryInterface $repository, string $left, string $operator, $right, string $alias = null): RequestInterface
Function routeParameters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function routeParameters(string $name, array $parameters): array
{
$replaces = [];
foreach ($this->routeUris[$name][static::ROUTE_URI_PARAMETERS] as $key => $required) {
- 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 itemsInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function itemsInfo(array $var, string $color = '#444'): string
{
$result = PHP_EOL;
foreach ($var as $key => $value) {
- 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 run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function run(): ApplicationInterface
{
$resourceManager = $this->resourceManager;
try {
- 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 expressionToString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function expressionToString($expression, SentenceInterface $sentence): string
{
if (is_array($expression)) {
return $this->expressionArrayToString($expression, $sentence);
}
- 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 orderByToString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function orderByToString(array $orderBy, SentenceInterface $sentence): string
{
if ($orderBy) {
$list = [];
- 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 debugDescription
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function debugDescription(): string
{
if (method_exists($this, '__debugInfo')) {
$items = $this->__debugInfo();
}
- 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 processFiles
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function processFiles(ResourceManagerInterface $resourceManager, $name, $type, $tempFilename, $error, $size): ?array
{
// Items
if (is_array($name)) {
$items = [];
- 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 addItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function addItems(Where $where, array $array): void
{
foreach ($array as $key => $value) {
if (is_numeric($key)) {
$where->sub($value);
- 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
Missing class import via use statement (line '79', column '32'). Open
$this->memcached = new \Memcached($this->persistentId);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '22', column '27'). Open
$reflection = new \ReflectionFunction($function);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '178', column '65'). Open
$this->memcached->set($key, $value, $seconds > 0 ? (new \DateTimeImmutable("now +$seconds seconds"))->getTimestamp() : $seconds);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '61', column '29'). Open
$dataByObject = new \SplObjectStorage();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}