YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Profile.php

Summary

Maintainability
A
1 hr
Test Coverage
F
49%

Method create has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function create()
    {
        $db = \App\Db::getInstance();
        $db->createCommand()->insert('vtiger_profile', [
            'profilename' => $this->name,
Severity: Minor
Found in vtlib/Vtiger/Profile.php - About 1 hr to fix

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

        public static function initForModule(ModuleBasic $moduleInstance)
        {
            $db = \App\Db::getInstance();
            $actionids = (new \App\Db\Query())->select(['actionid'])->from('vtiger_actionmapping')
                ->where(['actionname' => ['Save', 'EditView', 'Delete', 'index', 'DetailView', 'CreateView']])
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '58', column '22').
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid', 'actionid'])->from(['vtiger_actionmapping', 'vtiger_tab'])
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '74', column '13').
    Open

            throw new \App\Exceptions\AppException('Not implemented');
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '22').
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid'])->from('vtiger_tab')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '124', column '21').
    Open

            $actionids = (new \App\Db\Query())->select(['actionid'])->from('vtiger_actionmapping')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '40', column '22').
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid', 'fieldid'])->from('vtiger_field')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 '110', column '20').
    Open

            $profiles = (new \App\Db\Query())->select(['profileid'])->from('vtiger_profile')->column();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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

    The method save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->update();
            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

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

    Avoid using static access to class '\App\Cache' in method 'getAllIds'.
    Open

            if (\App\Cache::has('AllProfileIds', '')) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 'getAllIds'.
    Open

                return \App\Cache::get('AllProfileIds', '');
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 'initForModule'.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 'deleteForModule'.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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\Log' in method 'create'.
    Open

            \App\Log::trace('Initializing profile permissions ... DONE', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 'getAllIds'.
    Open

            \App\Cache::save('AllProfileIds', '', $profiles);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 'create'.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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\Log' in method 'initForModule'.
    Open

            \App\Log::trace('Initializing module permissions ... DONE', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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 "AllProfileIds" 3 times.
    Open

            if (\App\Cache::has('AllProfileIds', '')) {
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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 "actionid" 3 times.
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid', 'actionid'])->from(['vtiger_actionmapping', 'vtiger_tab'])
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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" 5 times.
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid', 'fieldid'])->from('vtiger_field')
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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 "profileid" 7 times.
    Open

                    'profileid' => $this->id,
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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 "permissions" 4 times.
    Open

            $db->createCommand()->batchInsert('vtiger_profile2tab', ['profileid', 'tabid', 'permissions'], $insertedData)->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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_profile2standardpermissions" 3 times.
    Open

                $db->createCommand()->insert('vtiger_profile2standardpermissions', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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_profile2field" 4 times.
    Open

                $db->createCommand()->insert('vtiger_profile2field', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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" 16 times.
    Open

            $dataReader = (new \App\Db\Query())->select(['tabid', 'fieldid'])->from('vtiger_field')
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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_profile2tab" 3 times.
    Open

            $db->createCommand()->batchInsert('vtiger_profile2tab', ['profileid', 'tabid', 'permissions'], $insertedData)->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.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 \App\Db::createCommand
    Open

            \App\Db::getInstance()->createCommand()->delete('vtiger_profile2field', ['fieldid' => $fieldInstance->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $profiles = (new \App\Db\Query())->select(['profileid'])->from('vtiger_profile')->column();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

                $db->createCommand()->insert('vtiger_profile2standardpermissions', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

                $db->createCommand()->insert('vtiger_profile2tab', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->delete('vtiger_def_org_share', ['tabid' => $moduleInstance->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

                $db->createCommand()->insert('vtiger_profile2field', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            \App\Db::getInstance()->createCommand()->batchInsert('vtiger_profile2field', ['profileid', 'tabid', 'fieldid', 'visible', 'readonly'], $insertedValues)->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace('Initializing module permissions ... DONE', __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->insert('vtiger_profile', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace('Initializing profile permissions ... DONE', __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->batchInsert('vtiger_profile2tab', ['profileid', 'tabid', 'permissions'], $insertedData)->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $dataReader = (new \App\Db\Query())->select(['tabid', 'actionid'])->from(['vtiger_actionmapping', 'vtiger_tab'])
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $dataReader = (new \App\Db\Query())->select(['tabid'])->from('vtiger_tab')
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->delete('vtiger_profile2standardpermissions', ['tabid' => $moduleInstance->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

                        $db->createCommand()->insert('vtiger_profile2standardpermissions', [
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $dataReader = (new \App\Db\Query())->select(['tabid', 'fieldid'])->from('vtiger_field')
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->delete('vtiger_profile2tab', ['tabid' => $moduleInstance->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $actionids = (new \App\Db\Query())->select(['actionid'])->from('vtiger_actionmapping')
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

            $db->createCommand()->delete('vtiger_profile2field', ['tabid' => $moduleInstance->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Profile.php by phan

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

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

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

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

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

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

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

        public $id;
    Severity: Minor
    Found in vtlib/Vtiger/Profile.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

            } else {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'profileid' => $this->id,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->batchInsert('vtiger_profile2tab', ['profileid', 'tabid', 'permissions'], $insertedData)->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'operation' => $row['actionid'],
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public function save()
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'visible' => 0,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

    Line exceeds 120 characters; contains 129 characters
    Open

            $db->createCommand()->batchInsert('vtiger_profile2tab', ['profileid', 'tabid', 'permissions'], $insertedData)->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            foreach ($profileids as &$profileid) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            \App\Db::getInstance()->createCommand()->delete('vtiger_profile2field', ['fieldid' => $fieldInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * Get all the existing profile ids.
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                return \App\Cache::get('AllProfileIds', '');
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->delete('vtiger_profile2field', ['tabid' => $moduleInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->delete('vtiger_profile2standardpermissions', ['tabid' => $moduleInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * Initialize profile setup for Field.
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public $id;
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $db->createCommand()->insert('vtiger_profile2standardpermissions', [
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public $desc;
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

    Line exceeds 120 characters; contains 126 characters
    Open

            \App\Db::getInstance()->createCommand()->delete('vtiger_profile2field', ['fieldid' => $fieldInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                'profilename' => $this->name,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $dataReader = (new \App\Db\Query())->select(['tabid', 'fieldid'])->from('vtiger_field')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public static function deleteForField(FieldBasic $fieldInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'permissions' => 0,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                            'tabid' => $moduleInstance->id,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                            'operation' => $actionid,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        private function create()
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'fieldid' => $row['fieldid'],
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'profileid' => $this->id,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'permissions' => 0,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public static function initForModule(ModuleBasic $moduleInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->createCommand()->query();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public static function initForField(FieldBasic $fieldInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $profileids = self::getAllIds();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public static function getAllIds()
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                            'permissions' => 0,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * Delete profile setup of the module.
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * @param ModuleBasic $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->delete('vtiger_def_org_share', ['tabid' => $moduleInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $this->create();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $this->update();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $dataReader = (new \App\Db\Query())->select(['tabid', 'actionid'])->from(['vtiger_actionmapping', 'vtiger_tab'])
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $profileids = self::getAllIds();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            foreach ($profileids as &$profileid) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $db->createCommand()->insert('vtiger_profile2field', [
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $dataReader = (new \App\Db\Query())->select(['tabid'])->from('vtiger_tab')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->createCommand()->query();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $insertedData[] = [$this->id, $row['tabid'], 0];
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        private function update()
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            throw new \App\Exceptions\AppException('Not implemented');
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            \App\Db::getInstance()->createCommand()->batchInsert('vtiger_profile2field', ['profileid', 'tabid', 'fieldid', 'visible', 'readonly'], $insertedValues)->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

    Line exceeds 120 characters; contains 171 characters
    Open

            \App\Db::getInstance()->createCommand()->batchInsert('vtiger_profile2field', ['profileid', 'tabid', 'fieldid', 'visible', 'readonly'], $insertedValues)->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $db->createCommand()->insert('vtiger_profile2tab', [
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'profileid' => $profileid,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                if ($moduleInstance->isentitytype) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            if (!$this->id) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'tabid' => $row['tabid'],
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            \App\Log::trace('Initializing profile permissions ... DONE', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * Delete profile information related with field.
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * @param FieldBasic $fieldInstance
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $profiles = (new \App\Db\Query())->select(['profileid'])->from('vtiger_profile')->column();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * @param ModuleBasic $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                        ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                'description' => $this->desc,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->createCommand()->query();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'readonly' => 0,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->where(['actionname' => ['Save', 'EditView', 'Delete', 'index', 'DetailView'], 'isentitytype' => 1])
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                $insertedValues[] = [$profileid, $fieldInstance->getModuleId(), $fieldInstance->id, 0, 0];
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                        $db->createCommand()->insert('vtiger_profile2standardpermissions', [
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                            'profileid' => $profileid,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $actionids = (new \App\Db\Query())->select(['actionid'])->from('vtiger_actionmapping')
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->where(['actionname' => ['Save', 'EditView', 'Delete', 'index', 'DetailView', 'CreateView']])
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public $name;
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->insert('vtiger_profile', [
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $this->id = $db->getLastInsertID('vtiger_profile_profileid_seq');
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'tabid' => $row['tabid'],
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $insertedData = [];
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $insertedValues = [];
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            if (\App\Cache::has('AllProfileIds', '')) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * @param FieldBasic $fieldInstance
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    'tabid' => $moduleInstance->id,
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            \App\Cache::save('AllProfileIds', '', $profiles);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            return $profiles;
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

         * Initialize profile setup for the module.
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ->column();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            \App\Log::trace('Initializing module permissions ... DONE', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

                    foreach ($actionids as &$actionid) {
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

        public static function deleteForModule(ModuleBasic $moduleInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

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

            $db->createCommand()->delete('vtiger_profile2tab', ['tabid' => $moduleInstance->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Profile.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status