YetiForceCompany/YetiForceCRM

View on GitHub
app/Automatic/Rules.php

Summary

Maintainability
A
55 mins
Test Coverage
F
0%

Function check has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function check(array $items, array $params): bool
    {
        $condition = $params['condition'] ?? '';
        $returnVal = false;
        foreach ($params['rules'] as $rule) {
Severity: Minor
Found in app/Automatic/Rules.php - About 55 mins to fix

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

The method __construct has a boolean flag argument $defaultValue, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct(array $config, $defaultValue = false)
Severity: Minor
Found in app/Automatic/Rules.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '146', column '13').
Open

        throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||$operator", 406);
Severity: Minor
Found in app/Automatic/Rules.php by phpmd

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

Avoid assigning values to variables in if clauses and the like (line '139', column '7').
Open

    protected function checkOperator(string $operator, array $items, $val): bool
    {
        if ($negation = $this->isNegation($operator)) {
            $operator = \substr($operator, 3, \strlen($operator) - 3);
        }
Severity: Minor
Found in app/Automatic/Rules.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

Avoid variables with short names like $b. Configured minimum length is 3.
Open

        $b = !empty($items);
Severity: Minor
Found in app/Automatic/Rules.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_ALL_RECORDS_EQUAL = 'allRecordsEqual';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the elements of the input array are not equal to the value.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($this->config as $key => $params) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $valueOfCondition
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $valueOfCondition
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the value in the input array does not exist.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_ONLY_CONTAINS = 'onlyContains';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ($this->check($items, $params)) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $returnVal;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $returnVal = $this->checkOperator($rule['operator'] ?? '', $items, $rule['value'] ?? '');
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $operator
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $methodName = 'operator' . ucfirst($operator);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function operatorIsExist(array $items, $valueOfCondition): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_NOT_ONLY_CONTAINS = 'notOnlyContains';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                break;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array  $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        throw new \App\Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||$operator", 406);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check condition only contains.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $b;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $returnVal = $this->defaultValue;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $returnVal = false;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $operator = \substr($operator, 3, \strlen($operator) - 3);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the elements of the input array are equal to the value.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the input array is not empty.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_NOT_NO_RECORDS = 'notNoRecords';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var mixed
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get value.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getValue(array $items)
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function check(array $items, array $params): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($params['rules'] as $rule) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (\method_exists($this, $methodName)) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed  $val
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $valueOfCondition
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->defaultValue = $defaultValue;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function checkOperator(string $operator, array $items, $val): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if there is a negation operator.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the condition all are equal.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function operatorAllRecordsEqual(array $items, $valueOfCondition): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ($val !== $valueOfCondition) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the condition that the array is empty.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_NO_RECORDS = 'noRecords';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $returnVal = $key;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ('or' === $condition && $returnVal) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    private function isNegation(string $operator): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return \strlen($operator) >= 3 && 'not' === \substr($operator, 0, 3);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the condition if it exists in the array.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_NOT_IS_EXIST = 'notIsExist';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the input array is empty.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    private $config = [];
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->config = $config;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check if the value in the input array exists.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return mixed
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Constructor.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check rules.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($negation = $this->isNegation($operator)) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $returnVal;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the condition.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($items as $val) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the input array contains values.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * The default value is returned if the rules do not specify this case.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $params
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $condition = $params['condition'] ?? '';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                break;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                break;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return empty($items);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_IS_EXIST = 'isExist';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $config
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return $negation ? !$this->{$methodName}($items, $val) : $this->{$methodName}($items, $val);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function operatorOnlyContains(array $items, $valueOfCondition): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $arrU = array_unique($items);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $b = !empty($items);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $items
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public const CONDITION_NOT_ALL_RECORDS_EQUAL = 'notAllRecordsEqual';
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Rules configuration.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var array
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function __construct(array $config, $defaultValue = false)
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    private $defaultValue;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed $defaultValue
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ('and' === $condition && !$returnVal) {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $operator
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                break;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Check the input array does not contain values.
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return empty(array_diff($arrU, $valueOfCondition)) && empty(array_diff($valueOfCondition, $arrU));
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return \in_array($valueOfCondition, $items);
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $b = false;
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function operatorNoRecords(array $items): bool
Severity: Minor
Found in app/Automatic/Rules.php by phpcodesniffer

There are no issues that match your filters.

Category
Status