open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Form/DataTransformer/ConditionToReferenceKeywordTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Reference to constant OPERATOR_SPLIT from undeclared class \OpenOrchestra\ModelInterface\Repository\RepositoryTrait\KeywordableTraitInterface
Open

        $keywordWithoutOperator = preg_replace(explode('|', KeywordableTraitInterface::OPERATOR_SPLIT), ' ', $keywords);

Avoid excessively long variable names like $keywordWithoutOperator. Keep variable name length under 20.
Open

        $keywordWithoutOperator = preg_replace(explode('|', KeywordableTraitInterface::OPERATOR_SPLIT), ' ', $keywords);

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

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

Opening brace should be on a new line
Open

    protected function getKeywordAsCondition($keywords) {

Opening brace should be on a new line
Open

    protected function getKeywordAsArray($keywords) {

There are no issues that match your filters.

Category
Status