YetiForceCompany/YetiForceCRM

View on GitHub
tests/Settings/Colors.php

Summary

Maintainability
A
25 mins
Test Coverage
A
100%

The class Colors has 12 public methods. Consider refactoring Colors to keep number of public methods under 10.
Open

class Colors extends \Tests\Base
{
    /**
     * Testing generation of colors css.
     */
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

Function testAddPicklistColorColumn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function testAddPicklistColorColumn()
    {
        $db = \App\Db::getInstance();
        $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
        $this->assertNotEmpty($tableSchema, 'Table vtiger_contract_priority not exists');
Severity: Minor
Found in tests/Settings/Colors.php - About 25 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

Missing class import via use statement (line '81', column '46').
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '103', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 1, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '52', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '172', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 0, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '85', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), '80B584', 'Returned picklist value color is different from default');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '80', column '27').
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '82', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), 'A0B584', 'Returned picklist value color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '170', column '38').
Open

        \App\Colors::updateGroupColor((new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '72', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '60', column '19').
Open

        $groupId = (new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar();
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '62', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '84', column '46').
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Minor
Found in tests/Settings/Colors.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

Missing class import via use statement (line '148', column '46').
Open

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Minor
Found in tests/Settings/Colors.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 using static access to class '\App\Module' in method 'testUpdateModuleColor'.
Open

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testActiveModuleColor'.
Open

        \App\Colors::activeModuleColor($moduleId, true, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testUpdatePicklistValueColor'.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testUpdatePicklistValueColor'.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testGetPicklistFieldsByModule'.
Open

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetColor'.
Open

        $this->assertNotEmpty(\App\Colors::get('', ''), 'Normalized empty color should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testResetToDefault'.
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testActiveModuleColor'.
Open

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetAllFilterColors'.
Open

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testAddPicklistColorColumn'.
Open

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGenerateColorsCss'.
Open

        \App\Colors::generate();
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testUpdateGroupColor'.
Open

        \App\Colors::updateGroupColor($groupId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testActiveModuleColor'.
Open

        $this->assertNotEmpty(\App\Colors::activeModuleColor($moduleId, true, ''), 'Returned module color should be random generated if provided empty string');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetRandomColor'.
Open

        $this->assertNotEmpty(\App\Colors::getRandomColor(), 'Generated color should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testResetToDefault'.
Open

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\User' in method 'testUpdateUserColor'.
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testUpdatePicklistValueColor'.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetColor'.
Open

        $this->assertSame(\App\Colors::get('A0B584', ''), '#A0B584', 'Color without # prefix should be normalized');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetPicklistFieldsByModule'.
Open

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Cache' in method 'testAddPicklistColorColumn'.
Open

                \App\Cache::clear();
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetAllFilterColors'.
Open

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors(cached) should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Db' in method 'testAddPicklistColorColumn'.
Open

        $db = \App\Db::getInstance();
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testResetToDefault'.
Open

        \App\Colors::updateModuleColor($moduleId, '');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testUpdateUserColor'.
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\User' in method 'testUpdateUserColor'.
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetColor'.
Open

        $this->assertNotEmpty(\App\Colors::get('#', 'fs$gdftd'), 'Normalized empty color(#only) with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\User' in method 'testResetToDefault'.
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetColor'.
Open

        $this->assertNotEmpty(\App\Colors::get('', 'fs$gdftd'), 'Normalized empty color with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testAddPicklistColorColumn'.
Open

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testResetToDefault'.
Open

        \App\Colors::activeModuleColor($moduleId, false, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testUpdateModuleColor'.
Open

        \App\Colors::updateModuleColor($moduleId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Module' in method 'testUpdatePicklistValueColor'.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGetColor'.
Open

        $this->assertNotEmpty(\App\Colors::get('#', ''), 'Normalized empty color(#only) should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testGenerateColorsCss'.
Open

        \App\Colors::generate();
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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\Colors' in method 'testResetToDefault'.
Open

        \App\Colors::updateGroupColor((new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpmd

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

Define a constant instead of duplicating this literal "color" 8 times.
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_groups" 3 times.
Open

        $groupId = (new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "activitytypeid" 3 times.
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "/public_html/layouts/resources/colors/picklists.css" 4 times.
Open

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css')) {
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "/app_data/owners_colors.php" 4 times.
Open

        if (\file_exists(ROOT_DIRECTORY . '/app_data/owners_colors.php')) {
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "/public_html/layouts/resources/colors/modules.css" 4 times.
Open

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css')) {
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_contract_priority" 4 times.
Open

        $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "groupid" 3 times.
Open

        $groupId = (new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "tabid" 6 times.
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "activitytype" 3 times.
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "/public_html/layouts/resources/colors/owners.css" 4 times.
Open

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css')) {
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "Leads" 4 times.
Open

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_activitytype" 3 times.
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "fieldid" 3 times.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_field" 3 times.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "vtiger_tab" 3 times.
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "fieldname" 3 times.
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "A0B584" 3 times.
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "#A0B584" 9 times.
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by sonar-php

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

function run() {
  prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
  execute('action1');
  release('action1');
}

Compliant Solution

ACTION_1 = 'action1';

function run() {
  prepare(ACTION_1);
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), '80B584', 'Returned picklist value color is different from default');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 1, 'Returned module color state is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::get('', ''), 'Normalized empty color should be random generated');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::get('#', ''), 'Normalized empty color(#only) should be random generated');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileExists
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db::getSchema
Open

                    $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 0, 'Returned module color state is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $groupId = (new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        \App\Colors::updateGroupColor((new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar(), '#E6FAD8');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileExists
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), '80B584', 'Returned picklist value color is different from default');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::get('', 'fs$gdftd'), 'Normalized empty color with value should be random generated');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertEmpty
Open

            $this->assertEmpty($column, 'column color in vtiger_contract_priority should not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileDoesNotExist
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" should not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors(cached) should be not empty');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileDoesNotExist
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" should not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileExists
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertGreaterThan
Open

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty($tableSchema, 'Table vtiger_contract_priority not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db::createCommand
Open

                    $db->createCommand()->dropColumn('vtiger_contract_priority', 'color')->execute();
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertEmpty
Open

                    $this->assertEmpty($column, 'Column color should be removed from vtiger_contract_priority');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileExists
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db::getSchema
Open

        $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

                $this->assertNotEmpty($column, 'Column color should exist on vtiger_contract_priority');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db::getSchema
Open

                $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to method getActiveAdminId from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#E6FAD8');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to method getActiveAdminId from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::getRandomColor(), 'Generated color should be not empty');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::activeModuleColor($moduleId, true, ''), 'Returned module color should be random generated if provided empty string');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors should be not empty');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileDoesNotExist
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" should not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertFileDoesNotExist
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" should not exists');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to method getActiveAdminId from undeclared class \App\User (Did you mean class \Tests\App\User)
Open

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), 'A0B584', 'Returned picklist value color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Argument 1 (moduleName) is bool|int but \App\Colors::getPicklistFieldsByModule() takes string defined at /code/app/Colors.php:209
Open

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Minor
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 0, 'Returned module color state is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), 'A0B584', 'Returned picklist value color is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 1, 'Returned module color state is different from provided');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Colors::get('#', 'fs$gdftd'), 'Normalized empty color(#only) with value should be random generated');
Severity: Critical
Found in tests/Settings/Colors.php by phan

Call to undeclared method \Tests\Settings\Colors::assertSame
Open

        $this->assertSame(\App\Colors::get('A0B584', ''), '#A0B584', 'Color without # prefix should be normalized');
Severity: Critical
Found in tests/Settings/Colors.php by phan

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

        $db = \App\Db::getInstance();
Severity: Minor
Found in tests/Settings/Colors.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

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testUpdateModuleColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), '80B584', 'Returned picklist value color is different from default');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors(cached) should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty($tableSchema, 'Table vtiger_contract_priority not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateModuleColor($moduleId, '');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        if (\file_exists(ROOT_DIRECTORY . '/app_data/owners_colors.php')) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            \unlink(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateGroupColor($groupId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 191 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 151 characters
Open

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::activeModuleColor($moduleId, true, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            $this->assertEmpty($column, 'column color in vtiger_contract_priority should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 230 characters
Open

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 142 characters
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 'A0B584', 'Returned module color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 1, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 196 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 1, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testGetRandomColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            if (null === $column) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                    $column = $tableSchema->getColumn((string) 'color');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing update user color.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 213 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['cal_color'])->from('vtiger_users')->where(['id' => \App\User::getActiveAdminId()])->scalar(), '#A0B584', 'Returned user color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 223 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), '80B584', 'Returned picklist value color is different from default');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testActiveModuleColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 160 characters
Open

        $this->assertNotEmpty(\App\Colors::activeModuleColor($moduleId, true, ''), 'Returned module color should be random generated if provided empty string');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 171 characters
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 195 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing color generation.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::getRandomColor(), 'Generated color should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 136 characters
Open

        $this->assertNotEmpty(\App\Colors::get('#', 'fs$gdftd'), 'Normalized empty color(#only) with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 196 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 0, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 129 characters
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 177 characters
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 155 characters
Open

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing activate module color.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::activeModuleColor($moduleId, true, ''), 'Returned module color should be random generated if provided empty string');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                if ($column) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testResetToDefault()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testGenerateColorsCss()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testGetPicklistFieldsByModule()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing color normalization.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::get('#', 'fs$gdftd'), 'Normalized empty color(#only) with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css')) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 184 characters
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileExists(ROOT_DIRECTORY . '/app_data/owners_colors.php', 'File "/app_data/owners_colors.php" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing update group color.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), 'A0B584', 'Returned picklist value color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing picklist fields by module getter.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 128 characters
Open

        $this->assertNotEmpty(\App\Colors::get('', 'fs$gdftd'), 'Normalized empty color with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                \App\Colors::addPicklistColorColumn((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('ServiceContracts'), 'fieldname' => 'contract_priority'])->scalar());
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                $this->assertNotEmpty($column, 'Column color should exist on vtiger_contract_priority');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing update module color.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 224 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_activitytype')->where(['activitytypeid' => $picklistValueId])->scalar(), 'A0B584', 'Returned picklist value color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                    $db->createCommand()->dropColumn('vtiger_contract_priority', 'color')->execute();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css')) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            \unlink(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing update picklist value color.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $picklistValueId = (new \App\Db\Query())->select(['activitytypeid'])->from('vtiger_activitytype')->where(['activitytype' => 'Call'])->scalar();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::get('#', ''), 'Normalized empty color(#only) should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        if ($tableSchema) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            \unlink(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            \unlink(ROOT_DIRECTORY . '/app_data/owners_colors.php');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 190 characters
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css', 'File "/public_html/layouts/resources/colors/picklists.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $db = \App\Db::getInstance();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                    $tableSchema = $db->getSchema()->getTableSchema('vtiger_contract_priority', true);
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::generate();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/owners.css', 'File "/public_html/layouts/resources/colors/owners.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['color'])->from('vtiger_groups')->where(['groupid' => $groupId])->scalar(), '#A0B584', 'Returned group color is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 240 characters
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 240 characters
Open

        \App\Colors::updatePicklistValueColor((new \App\Db\Query())->select(['fieldid'])->from('vtiger_field')->where(['tabid' => \App\Module::getModuleId('Calendar'), 'fieldname' => 'activitytype'])->scalar(), $picklistValueId, '#80B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing get all filter colors.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::generate();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testUpdateUserColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testGetAllFilterColors()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::get('', ''), 'Normalized empty color should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing creation picklist color column.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                \App\Cache::clear();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Reset to default values.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 126 characters
Open

        \App\Colors::updateGroupColor((new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     * Testing generation of colors css.
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        if (\file_exists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/picklists.css')) {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 173 characters
Open

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testUpdateGroupColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $groupId = (new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar();
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateModuleColor($moduleId, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testUpdatePicklistValueColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertGreaterThan(0, (\count(\App\Colors::getPicklistFieldsByModule(\App\Module::getModuleId('Leads')))), 'Leads should contain picklists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::get('', 'fs$gdftd'), 'Normalized empty color with value should be random generated');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame(\App\Colors::get('A0B584', ''), '#A0B584', 'Color without # prefix should be normalized');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateGroupColor((new \App\Db\Query())->select(['groupid'])->from('vtiger_groups')->scalar(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::activeModuleColor($moduleId, false, '#A0B584');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['coloractive'])->from('vtiger_tab')->where(['tabid' => $moduleId])->scalar(), 0, 'Returned module color state is different from provided');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertFileExists(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $moduleId = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

            $column = $tableSchema->getColumn((string) 'color');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                $column = $tableSchema->getColumn((string) 'color');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

                    $this->assertEmpty($column, 'Column color should be removed from vtiger_contract_priority');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        \App\Colors::updateUserColor(\App\User::getActiveAdminId(), '#E6FAD8');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

Line exceeds 120 characters; contains 186 characters
Open

        $this->assertFileDoesNotExist(ROOT_DIRECTORY . '/public_html/layouts/resources/colors/modules.css', 'File "/public_html/layouts/resources/colors/modules.css" should not exists');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

        $this->assertNotEmpty(\App\Colors::getAllFilterColors(), 'Filter colors should be not empty');
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testGetColor()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

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

    public function testAddPicklistColorColumn()
Severity: Minor
Found in tests/Settings/Colors.php by phpcodesniffer

There are no issues that match your filters.

Category
Status