YetiForceCompany/YetiForceCRM

View on GitHub
tests/Settings/TreesManager.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using undefined variables such as '$tree1' which will lead to PHP notices.
Open

        $tree1[] = $this->createItemForTree('item2', 2);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share2' which will lead to PHP notices.
Open

        $share2[] = \App\Module::getModuleId('Contacts');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share2' which will lead to PHP notices.
Open

            [2, null, [], $share2],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

            [4, null, $tree4, []],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share2' which will lead to PHP notices.
Open

            [3, null, $tree1, $share2],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree1' which will lead to PHP notices.
Open

            [1, null, $tree1, []],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share2' which will lead to PHP notices.
Open

        $share2[] = \App\Module::getModuleId('Calendar');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

        $tree4[] = $this->createItemForTree('item1Edit', 1);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share1' which will lead to PHP notices.
Open

            [2, $tree4, $share1],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share1' which will lead to PHP notices.
Open

        $share1[] = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree0' which will lead to PHP notices.
Open

            [0, $tree0, []],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share1' which will lead to PHP notices.
Open

            [1, [], $share1],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree1' which will lead to PHP notices.
Open

        $tree1[] = $this->createItemForTree('item1', 1);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree1' which will lead to PHP notices.
Open

            [3, null, $tree1, $share2],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

        $tree4[] = $this->createItemForTree('item2Edit', 2, [$this->createItemForTree('item3Edit', 3), $this->createItemForTree('itemEdit4', 4)]);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share2' which will lead to PHP notices.
Open

        $share2[] = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree0' which will lead to PHP notices.
Open

        $tree0[] = $this->createItemForTree('itemEdit1', 1);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share1' which will lead to PHP notices.
Open

        $share1[] = \App\Module::getModuleId('Calendar');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

            [2, $tree4, $share1],
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

        $tree4[] = $this->createItemForTree('item1', 1);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree4' which will lead to PHP notices.
Open

        $tree4[] = $this->createItemForTree('item2', 2, [$this->createItemForTree('item3', 3), $this->createItemForTree('item4', 4)]);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$share1' which will lead to PHP notices.
Open

        $share1[] = \App\Module::getModuleId('Contacts');
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$tree0' which will lead to PHP notices.
Open

        $tree0[] = $this->createItemForTree('itemEdit2', 2);
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Missing class import via use statement (line '47', column '15').
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Minor
Found in tests/Settings/TreesManager.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 '95', column '26').
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Minor
Found in tests/Settings/TreesManager.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 '112', column '27').
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->exists(), 'The record was not removed from the database ID: ' . self::$treesId[$key]);
Severity: Minor
Found in tests/Settings/TreesManager.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 '51', column '26').
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Minor
Found in tests/Settings/TreesManager.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 '92', column '15').
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Minor
Found in tests/Settings/TreesManager.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 '114', column '26').
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), 0, 'The records were not removed from the table "vtiger_trees_templates_data"');
Severity: Minor
Found in tests/Settings/TreesManager.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 '\Settings_TreesManager_Record_Model' in method 'testEditTree'.
Open

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));
Severity: Minor
Found in tests/Settings/TreesManager.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 '\Settings_TreesManager_Record_Model' in method 'testDeleteTree'.
Open

        $recordModel = \Settings_TreesManager_Record_Model::getInstanceById(self::$treesId[$key]);
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForEditTree'.
Open

        $share1[] = \App\Module::getModuleId('Calendar');
Severity: Minor
Found in tests/Settings/TreesManager.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 '\Settings_TreesManager_Record_Model' in method 'testAddTree'.
Open

        $recordModel = \Settings_TreesManager_Record_Model::getCleanInstance();
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForTree'.
Open

        $share2[] = \App\Module::getModuleId('Contacts');
Severity: Minor
Found in tests/Settings/TreesManager.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 'testAddTree'.
Open

            $moduleId = \App\Module::getModuleId('Dashboard');
Severity: Minor
Found in tests/Settings/TreesManager.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 '\Settings_TreesManager_Record_Model' in method 'testAddTree'.
Open

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));
Severity: Minor
Found in tests/Settings/TreesManager.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 '\Settings_TreesManager_Record_Model' in method 'testEditTree'.
Open

        $recordModel = \Settings_TreesManager_Record_Model::getInstanceById(self::$treesId[$key]);
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForEditTree'.
Open

        $share1[] = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForTree'.
Open

        $share2[] = \App\Module::getModuleId('Leads');
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForEditTree'.
Open

        $share1[] = \App\Module::getModuleId('Contacts');
Severity: Minor
Found in tests/Settings/TreesManager.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 'providerForTree'.
Open

        $share2[] = \App\Module::getModuleId('Calendar');
Severity: Minor
Found in tests/Settings/TreesManager.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 "share" 4 times.
Open

        $recordModel->set('share', $share);
Severity: Critical
Found in tests/Settings/TreesManager.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_trees_templates_data" 3 times.
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Critical
Found in tests/Settings/TreesManager.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 "children" 3 times.
Open

            if (\is_array($item['children'])) {
Severity: Critical
Found in tests/Settings/TreesManager.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 "templateid" 6 times.
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Critical
Found in tests/Settings/TreesManager.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_trees_templates" 3 times.
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Critical
Found in tests/Settings/TreesManager.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.

Avoid unused parameters such as '$tree'.
Open

    public function testDeleteTree($key, $moduleId = null, $tree = [], $share = [])
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$share'.
Open

    public function testDeleteTree($key, $moduleId = null, $tree = [], $share = [])
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$moduleId'.
Open

    public function testDeleteTree($key, $moduleId = null, $tree = [], $share = [])
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

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

        $this->assertFalse((new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->exists(), 'The record was not removed from the database ID: ' . self::$treesId[$key]);
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), 0, 'The records were not removed from the table "vtiger_trees_templates_data"');
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Variable $tree1 was undeclared, but array fields are being added to it.
Open

        $tree1[] = $this->createItemForTree('item1', 1);
Severity: Info
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), 0, 'The records were not removed from the table "vtiger_trees_templates_data"');
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame($row['name'], 'TestTreeEdit' . $key);
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Call to undeclared method \Tests\Settings\TreesManager::assertNotNull
Open

        $this->assertNotNull($recordModel, 'Settings_TreesManager_Record_Model is null');
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Call to undeclared method \Tests\Settings\TreesManager::assertFalse
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->exists(), 'The record was not removed from the database ID: ' . self::$treesId[$key]);
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame($row['tabid'], $moduleId);
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame($row['name'], 'TestTree' . $key);
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

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

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Variable $tree4 was undeclared, but array fields are being added to it.
Open

        $tree4[] = $this->createItemForTree('item1', 1);
Severity: Info
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Variable $share2 was undeclared, but array fields are being added to it.
Open

        $share2[] = \App\Module::getModuleId('Contacts');
Severity: Info
Found in tests/Settings/TreesManager.php by phan

Variable $tree4 was undeclared, but array fields are being added to it.
Open

        $tree4[] = $this->createItemForTree('item1Edit', 1);
Severity: Info
Found in tests/Settings/TreesManager.php by phan

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));
Severity: Critical
Found in tests/Settings/TreesManager.php by phan

Variable $share1 was undeclared, but array fields are being added to it.
Open

        $share1[] = \App\Module::getModuleId('Contacts');
Severity: Info
Found in tests/Settings/TreesManager.php by phan

Variable $tree0 was undeclared, but array fields are being added to it.
Open

        $tree0[] = $this->createItemForTree('itemEdit1', 1);
Severity: Info
Found in tests/Settings/TreesManager.php by phan

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

    private function createItemForTree($itemName, $id, $children = [])
Severity: Minor
Found in tests/Settings/TreesManager.php by phpmd

ShortVariable

Since: 0.2

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

Example

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

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

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

    public function testAddTree($key, $moduleId = null, $tree = [], $share = [])

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

        if (empty($moduleId)) {

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

     * @param array      $tree

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

    /**

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

            [4, null, $tree4, []],

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

     * @param mixed  $children

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

     * @codeCoverageIgnore

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

    {

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

    {

Line exceeds 120 characters; contains 167 characters
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));

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

        $recordModel->delete();

Line exceeds 120 characters; contains 146 characters
Open

        $tree4[] = $this->createItemForTree('item2Edit', 2, [$this->createItemForTree('item3Edit', 3), $this->createItemForTree('itemEdit4', 4)]);

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

    private static $treesId;

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

        $recordModel->save();

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

     * @param array $tree

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

                $cnt += self::countItems($item['children']);

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

     * @param mixed      $share

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

    /**

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

     *

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

     * @codeCoverageIgnore

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

     * Create item for tree array.

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

            'a_attr' => ['href' => '#', 'id' => $id . '_anchor'],

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

     *

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

            [2, $tree4, $share1],

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

     * Count item in tree.

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

            }

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

     * Testing edition tree.

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

    }

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

        $tree4[] = $this->createItemForTree('item2', 2, [$this->createItemForTree('item3', 3), $this->createItemForTree('item4', 4)]);

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

            [1, null, $tree1, []],

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

     *

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

     * @param string $itemName

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

     */

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

    private function createItemForTree($itemName, $id, $children = [])

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

            'data' => [],

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

        ];

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

     * @return array

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

        $tree4[] = $this->createItemForTree('item1Edit', 1);

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

        $tree4[] = $this->createItemForTree('item2Edit', 2, [$this->createItemForTree('item3Edit', 3), $this->createItemForTree('itemEdit4', 4)]);

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

     */

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

    /**

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

     * @param int|string $key

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

        $this->assertSame($row['name'], 'TestTree' . $key);

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

        $cnt = \count($tree);

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

        $recordModel = \Settings_TreesManager_Record_Model::getInstanceById(self::$treesId[$key]);

Line exceeds 120 characters; contains 215 characters
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->exists(), 'The record was not removed from the database ID: ' . self::$treesId[$key]);

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

        $tree1[] = $this->createItemForTree('item2', 2);

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

     * @dataProvider providerForTree

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

            $moduleId = \App\Module::getModuleId('Dashboard');

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

        $recordModel->set('tree', $tree);

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

        $this->assertSame($row['tabid'], $moduleId);

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

        foreach ($tree as $item) {

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

        $this->assertSame($row['name'], 'TestTreeEdit' . $key);

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

    /**

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

        $recordModel->set('share', $share);

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

    }

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

     * @param array      $tree

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

        $recordModel->set('name', 'TestTreeEdit' . $key);

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

     * @param int|null   $moduleId

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

        $tree1[] = $this->createItemForTree('item1', 1);

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

        $share2[] = \App\Module::getModuleId('Calendar');

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

        return [

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

            [3, null, $tree1, $share2],

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

        ];

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

     * @return array

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

    public function providerForEditTree()

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

        $tree0[] = $this->createItemForTree('itemEdit2', 2);

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

    }

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

     * Array of trees id.

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

        $recordModel->set('tabid', $moduleId);

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

    /**

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

        $recordModel->set('share', $share);

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

     * Testing deletion tree.

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

    {

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

        $share2[] = \App\Module::getModuleId('Contacts');

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

        $share2[] = \App\Module::getModuleId('Leads');

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

            [2, null, [], $share2],

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

    }

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

        return [

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

            'children' => $children,

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

    /**

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

            [1, [], $share1],

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));

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

     *

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

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();

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

    }

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

     */

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

     * Data provider for testAddTree.

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

     * @return array

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

        $tree4[] = $this->createItemForTree('item1', 1);

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

            [0, null, [], []],

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

    }

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

    {

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

        $share1[] = \App\Module::getModuleId('Contacts');

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

            [3, [], []],

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

     */

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

        $recordModel = \Settings_TreesManager_Record_Model::getInstanceById(self::$treesId[$key]);

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

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));

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

     *

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

            'text' => $itemName,

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

            'icon' => '',

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

        $tree0[] = $this->createItemForTree('itemEdit1', 1);

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

        $share1[] = \App\Module::getModuleId('Calendar');

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

        ];

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

     *

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

        }

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

        $recordModel = \Settings_TreesManager_Record_Model::getCleanInstance();

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

        self::$treesId[$key] = $recordModel->getId();

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

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();

Line exceeds 120 characters; contains 167 characters
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));

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

    private static function countItems($tree)

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

     */

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

        $this->assertNotNull($recordModel, 'Settings_TreesManager_Record_Model is null');

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

        $recordModel->set('replace', '');

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

     *

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

        $this->assertFalse((new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->exists(), 'The record was not removed from the database ID: ' . self::$treesId[$key]);

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), 0, 'The records were not removed from the table "vtiger_trees_templates_data"');

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

     */

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

    /**

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

            [0, $tree0, []],

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

     * Testing creation tree.

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

     */

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

            if (\is_array($item['children'])) {

Line exceeds 120 characters; contains 222 characters
Open

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), 0, 'The records were not removed from the table "vtiger_trees_templates_data"');

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

    public function providerForTree()

Line exceeds 120 characters; contains 134 characters
Open

        $tree4[] = $this->createItemForTree('item2', 2, [$this->createItemForTree('item3', 3), $this->createItemForTree('item4', 4)]);

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

            'state' => ['loaded' => '1', 'opened' => false, 'selected' => false, 'disabled' => false],

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

        $share1[] = \App\Module::getModuleId('Leads');

Line exceeds 120 characters; contains 123 characters
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();

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

        $this->assertSame($row['share'], \Settings_TreesManager_Record_Model::getShareFromArray($share));

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

    }

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

     *

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

     * @param int|string $key

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

     * @codeCoverageIgnore

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

     *

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

        $recordModel->set('tree', $tree);

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

        $recordModel->save();

Line exceeds 120 characters; contains 123 characters
Open

        $row = (new \App\Db\Query())->from('vtiger_trees_templates')->where(['templateid' => self::$treesId[$key]])->one();

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

     * @param int|string $key

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

     * @param mixed      $share

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

    public function testDeleteTree($key, $moduleId = null, $tree = [], $share = [])

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

    {

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

            'li_attr' => ['id' => $id],

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

     */

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

            [4, [], []],

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

     * @param array      $tree

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

     * @return int

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

    {

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

    /**

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

    public function testEditTree($key, $tree = [], $share = [])

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

        $this->assertSame((new \App\Db\Query())->from('vtiger_trees_templates_data')->where(['templateid' => self::$treesId[$key]])->count(), self::countItems($tree));

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

    {

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

            'id' => $id,

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

        return [

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

     * @var array

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

     *

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

     * @param int|null   $moduleId

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

     * @param mixed      $share

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

        $recordModel->set('name', 'TestTree' . $key);

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

        return self::$treesId[$key];

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

        }

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

        return $cnt;

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

     * @dataProvider providerForEditTree

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

     * @dataProvider providerForTree

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

     * @param int    $id

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

     * Data provider for testEditTree.

There are no issues that match your filters.

Category
Status