app/Conditions/QueryFields/PicklistField.php
Avoid using static access to class '\App\RecordStatus' in method 'operatorRo'. Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_OPEN)];
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\RecordStatus' in method 'operatorRc'. Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_CLOSED)];
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function operatorN(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getValue()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return explode('##', $this->value);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Record closed operator.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_CLOSED)];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ['NOT IN', $this->getColumnName(), $this->getValue()];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Not equal operator.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return mixed
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (\is_array($this->value)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function operatorRo()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_CLOSED)];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Record open operator.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function operatorRc()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get value.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_OPEN)];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
Open
return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_OPEN)];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks