app/Fields/MultiDomain.php
Missing class import via use statement (line '32', column '25'). Open
Open
$queryGenerator = new \App\QueryGenerator($moduleName);
- 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
Call to method setFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
Open
$queryGenerator->setFields(['id']);
- Exclude checks
Call to method addCondition
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
Open
$queryGenerator->addCondition($fieldName, $domain, 'a');
- Exclude checks
Call to method __construct
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
Open
$queryGenerator = new \App\QueryGenerator($moduleName);
- Exclude checks
Call to method createQuery
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
Open
$ids = $queryGenerator->createQuery()->column();
- Exclude checks
Reference to instance property permissions
from undeclared class \App\QueryGenerator
Open
Open
$queryGenerator->permissions = false;
- Exclude checks
Call to method getModuleField
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
Open
if ($queryGenerator->getModuleField($fieldName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$queryGenerator = new \App\QueryGenerator($moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$queryGenerator->addCondition($fieldName, $domain, 'a');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Find crm ids with specified domain.
- 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
* @param string $fieldName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return int[]
- 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
if ($queryGenerator->getModuleField($fieldName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function findIdByDomain(string $moduleName, string $fieldName, string $domain)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$ids = $queryGenerator->createQuery()->column();
- 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
* @param string $moduleName
- 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
* @param string $domain
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$ids = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$queryGenerator->permissions = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$queryGenerator->setFields(['id']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $ids;
- Exclude checks