YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Link.php

Summary

Maintainability
F
3 days
Test Coverage
F
42%

Function getAllByType has a Cognitive Complexity of 122 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getAllByType($tabid, $type = false, $parameters = false)
    {
        if (\App\Cache::has('AllLinks', 'ByType')) {
            $rows = \App\Cache::get('AllLinks', 'ByType');
        } else {
Severity: Minor
Found in vtlib/Vtiger/Link.php - About 2 days 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

Method getAllByType has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getAllByType($tabid, $type = false, $parameters = false)
    {
        if (\App\Cache::has('AllLinks', 'ByType')) {
            $rows = \App\Cache::get('AllLinks', 'ByType');
        } else {
Severity: Major
Found in vtlib/Vtiger/Link.php - About 4 hrs to fix

    The class Link has an overall complexity of 57 which is very high. The configured complexity threshold is 50.
    Open

    class Link
    {
        public $tabid;
        public $linkid;
        public $linktype;
    Severity: Minor
    Found in vtlib/Vtiger/Link.php by phpmd

    Method addLink has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
        {
            $db = \App\Db::getInstance();
            if (0 != $tabid) {
                $exists = (new \App\Db\Query())->from('vtiger_links')
    Severity: Minor
    Found in vtlib/Vtiger/Link.php - About 1 hr to fix

      Method addLink has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
      Severity: Major
      Found in vtlib/Vtiger/Link.php - About 1 hr to fix

        Function addLink has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
            {
                $db = \App\Db::getInstance();
                if (0 != $tabid) {
                    $exists = (new \App\Db\Query())->from('vtiger_links')
        Severity: Minor
        Found in vtlib/Vtiger/Link.php - About 35 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

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

            public function initialize($valuemap)
            {
                foreach ($valuemap as $key => $value) {
                    if (!empty($value) && ('linkurl' == $key || 'linkicon' == $key)) {
                        $this->{$key} = \App\Purifier::decodeHtml($value);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

        The method getAllByType() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
            {
                if (\App\Cache::has('AllLinks', 'ByType')) {
                    $rows = \App\Cache::get('AllLinks', 'ByType');
                } else {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        The method getAllByType() has an NPath complexity of 16524. The configured NPath complexity threshold is 200.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
            {
                if (\App\Cache::has('AllLinks', 'ByType')) {
                    $rows = \App\Cache::get('AllLinks', 'ByType');
                } else {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        NPathComplexity

        Since: 0.1

        The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

        Example

        class Foo {
            function bar() {
                // lots of complicated code
            }
        }

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

        The method getAllByType() has a Cyclomatic Complexity of 36. The configured cyclomatic complexity threshold is 10.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
            {
                if (\App\Cache::has('AllLinks', 'ByType')) {
                    $rows = \App\Cache::get('AllLinks', 'ByType');
                } else {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

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

        This function has 8 parameters, which is greater than the 7 authorized.
        Open

            public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
        Severity: Major
        Found in vtlib/Vtiger/Link.php by sonar-php

        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

        Noncompliant Code Example

        With a maximum number of 4 parameters:

        function doSomething($param1, $param2, $param3, $param4, $param5) {
        ...
        }
        

        Compliant Solution

        function doSomething($param1, $param2, $param3, $param4) {
        ...
        }
        

        Refactor this function to reduce its Cognitive Complexity from 125 to the 15 allowed.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by sonar-php

        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

        See

        The method getAllByType has a boolean flag argument $type, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        BooleanArgumentFlag

        Since: 1.4.0

        A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

        Example

        class Foo {
            public function bar($flag = true) {
            }
        }

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

        Missing class import via use statement (line '290', column '22').
        Open

                $dataReader = (new \App\Db\Query())->from('vtiger_links')
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '314', column '20').
        Open

                $linkData = (new \App\Db\Query())->from('vtiger_links')->where(['linkid' => $linkId])->one();
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 deleteLink has a boolean flag argument $url, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public static function deleteLink($tabid, $type, $label, $url = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        BooleanArgumentFlag

        Since: 1.4.0

        A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

        Example

        class Foo {
            public function bar($flag = true) {
            }
        }

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

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

                    $exists = (new \App\Db\Query())->from('vtiger_links')
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '175', column '24').
        Open

                    $linksFromDb = (new \App\Db\Query())->from('vtiger_links')->all();
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '244', column '22').
        Open

                $strtemplate = new \Vtiger_StringTemplate();
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 getAllByType has a boolean flag argument $parameters, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        BooleanArgumentFlag

        Since: 1.4.0

        A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

        Example

        class Foo {
            public function bar($flag = true) {
            }
        }

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

        Avoid using static access to class '\App\Db' in method 'deleteLink'.
        Open

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

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

                    \App\Cache::save('AllLinks', 'ByType', $rows);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '\vtlib\Deprecated' in method 'getAllByType'.
        Open

                    if (!empty($row['handler_path']) && \vtlib\Deprecated::isFileAccessible($row['handler_path'])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                    } else {
                        $this->{$key} = $value;
                    }
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                } else {
                    $linksFromDb = (new \App\Db\Query())->from('vtiger_links')->all();
                    $rows = [];
                    foreach ($linksFromDb as $row) {
                        $rows[$row['tabid']][$row['linktype']][] = $row;
        Severity: Minor
        Found in vtlib/Vtiger/Link.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\Purifier' in method 'initialize'.
        Open

                        $this->{$key} = \App\Purifier::decodeHtml($value);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'getAllByType'.
        Open

                    $rows = \App\Cache::get('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                } else {
                    foreach ($rows[$tabid] as $linkType) {
                        foreach ($linkType as $data) {
                            $links[] = $data;
                        }
        Severity: Minor
        Found in vtlib/Vtiger/Link.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\Log' in method 'deleteLink'.
        Open

                    \App\Log::trace("Deleting Link ($type - $label - $url) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'getLinkData'.
        Open

                \App\Cache::save('Link', $linkId, $linkData);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                } else {
                    $db->createCommand()->delete('vtiger_links', [
                        'tabid' => $tabid,
                        'linktype' => $type,
                        'linklabel' => $label,
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                    } else {
                        if (self::IGNORE_MODULE === $tabid) {
                            foreach ($rows as $row) {
                                if (isset($row[$type])) {
                                    foreach ($row[$type] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                        } else {
                            if (isset($rows[0][$type])) {
                                foreach ($rows[0][$type] as $data) {
                                    $links[] = $data;
                                }
        Severity: Minor
        Found in vtlib/Vtiger/Link.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\Log' in method 'addLink'.
        Open

                    \App\Log::trace("Adding Link ($type - $label) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'deleteLink'.
        Open

                \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'module'.
        Open

                    return \App\Module::getModuleName($this->tabid);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'deleteAll'.
        Open

                \App\Log::trace('Deleting Links ... DONE');
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'getAllByType'.
        Open

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

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

                    \App\Log::trace("Deleting Link ($type - $label) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'deleteAll'.
        Open

                \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 'getLinkData'.
        Open

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

                    \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '\vtlib\Deprecated' in method 'getAllByType'.
        Open

                            $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 '\vtlib\Deprecated' in method 'getAllByType'.
        Open

                        \vtlib\Deprecated::checkFileAccessForInclusion($row['handler_path']);
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                    } else {
                        $instances[$instance->linktype] = $instance;
                    }
        Severity: Minor
        Found in vtlib/Vtiger/Link.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\User' in method 'getAllByType'.
        Open

                            $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.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

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

                        } else {
                            foreach ($type as $typeLink) {
                                if (isset($rows[0][$typeLink])) {
                                    foreach ($rows[0][$typeLink] as $data) {
                                        $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.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\Log' in method 'getAllByType'.
        Open

                            \App\Log::trace('Ignoring Link ... ' . var_export($row, true));
        Severity: Minor
        Found in vtlib/Vtiger/Link.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 "linkicon" 3 times.
        Open

                    if (!empty($value) && ('linkurl' == $key || 'linkicon' == $key)) {
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "ByType" 6 times.
        Open

                    \App\Cache::delete('AllLinks', 'ByType');
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "linkurl" 4 times.
        Open

                    if (!empty($value) && ('linkurl' == $key || 'linkicon' == $key)) {
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "handler_path" 5 times.
        Open

                        $params['handler_path'] = $handlerInfo['path'] ?? null;
        Severity: Critical
        Found in vtlib/Vtiger/Link.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_links" 8 times.
        Open

                    $exists = (new \App\Db\Query())->from('vtiger_links')
        Severity: Critical
        Found in vtlib/Vtiger/Link.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" 7 times.
        Open

                        ->where(['tabid' => $tabid, 'linktype' => $type, 'linkurl' => $url, 'linkicon' => $iconpath, 'linklabel' => $label])
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "linktype" 5 times.
        Open

                        ->where(['tabid' => $tabid, 'linktype' => $type, 'linkurl' => $url, 'linkicon' => $iconpath, 'linklabel' => $label])
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "linklabel" 4 times.
        Open

                        ->where(['tabid' => $tabid, 'linktype' => $type, 'linkurl' => $url, 'linkicon' => $iconpath, 'linklabel' => $label])
        Severity: Critical
        Found in vtlib/Vtiger/Link.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 "AllLinks" 6 times.
        Open

                    \App\Cache::delete('AllLinks', 'ByType');
        Severity: Critical
        Found in vtlib/Vtiger/Link.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.

        Argument 2 (key) is int but \App\Cache::save() takes string defined at /code/app/Cache.php:89
        Open

                \App\Cache::save('Link', $linkId, $linkData);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phan

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

                    $db->createCommand()->delete('vtiger_links', [
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    \App\Log::trace("Deleting Link ($type - $label) ... DONE");
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    \App\Log::trace("Deleting Link ($type - $label - $url) ... DONE");
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    $db->createCommand()->delete('vtiger_links', [
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    \App\Log::trace("Adding Link ($type - $label) ... DONE");
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                            $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                            \App\Log::trace('Ignoring Link ... ' . var_export($row, true));
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

        Argument 2 (key) is int but \App\Cache::has() takes string defined at /code/app/Cache.php:74
        Open

                if (\App\Cache::has('Link', $linkId)) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phan

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

                    $exists = (new \App\Db\Query())->from('vtiger_links')
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

        Default value for array $parameters can't be false
        Open

            public static function getAllByType($tabid, $type = false, $parameters = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phan

        Argument 2 (key) is int but \App\Cache::get() takes string defined at /code/app/Cache.php:61
        Open

                    return \App\Cache::get('Link', $linkId);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phan

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

                $linkData = (new \App\Db\Query())->from('vtiger_links')->where(['linkid' => $linkId])->one();
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                \App\Log::trace('Deleting Links ... DONE');
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                $dataReader = (new \App\Db\Query())->from('vtiger_links')
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    $linksFromDb = (new \App\Db\Query())->from('vtiger_links')->all();
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

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

                    $db->createCommand()->insert('vtiger_links', $params)->execute();
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

        Default value for string $url can't be false
        Open

            public static function deleteLink($tabid, $type, $label, $url = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phan

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

                \App\Db::getInstance()->createCommand()->delete('vtiger_links', ['tabid' => $tabid])->execute();
        Severity: Critical
        Found in vtlib/Vtiger/Link.php by phan

        A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 19 and the first side effect is on line 14.
        Open

        <?php
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

        The property $__cacheSchemaChanges is not named in camelCase.
        Open

        class Link
        {
            public $tabid;
            public $linkid;
            public $linktype;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        CamelCasePropertyName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name attributes.

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        The property $handler_class is not named in camelCase.
        Open

        class Link
        {
            public $tabid;
            public $linkid;
            public $linktype;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        CamelCasePropertyName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name attributes.

        Example

        class ClassName {
            protected $property_name;
        }

        Source

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

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

        The property $handler_path is not named in camelCase.
        Open

        class Link
        {
            public $tabid;
            public $linkid;
            public $linktype;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpmd

        CamelCasePropertyName

        Since: 0.2

        It is considered best practice to use the camelCase notation to name attributes.

        Example

        class ClassName {
            protected $property_name;
        }

        Source

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

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

        Property name "$__cacheSchemaChanges" should not be prefixed with an underscore to indicate visibility
        Open

            public static $__cacheSchemaChanges = [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $linkid;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param int         $tabid       Module ID
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linklabel' => $label,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param array $valuemap
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    if (!empty($value) && ('linkurl' == $key || 'linkicon' == $key)) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

             * @param array|null  $handlerInfo
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

        Line exceeds 120 characters; contains 132 characters
        Open

                        ->where(['tabid' => $tabid, 'linktype' => $type, 'linkurl' => $url, 'linkicon' => $iconpath, 'linklabel' => $label])
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $params = [
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            // Ignore module while selection
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Initialize this instance.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                return false;
        Severity: Minor
        Found in vtlib/Vtiger/Link.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/Link.php by phpcodesniffer

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

                foreach ($valuemap as $key => $value) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * Add link given module.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param string      $url         HREF value or URL to use for the link
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linktype' => $type,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param string $type  Link Type (like DETAIL_VIEW_BASIC). Useful for grouping based on pages
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param string $url   URL of link to lookup while deleting
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linktype' => $type,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $linkicon;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param string      $iconpath    ICON to use on the display
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                if (0 != $tabid) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $exists = (new \App\Db\Query())->from('vtiger_links')
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                        'linklabel' => $label,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $status = false;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $params;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param string      $label       Label to display
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param int         $sequence    Order or sequence of displaying the link
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

        Line exceeds 120 characters; contains 135 characters
        Open

            public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linktype' => $type,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $linktype;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    \App\Log::trace("Adding Link ($type - $label) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Delete link of the module.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                if ($url) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linkurl' => $url,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $db->createCommand()->delete('vtiger_links', [
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                \App\Db::getInstance()->createCommand()->delete('vtiger_links', ['tabid' => $tabid])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                    if (isset($rows[$moduleId][$typ])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $instances[$t] = [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                            \App\Log::trace('Ignoring Link ... ' . var_export($row, true));
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public $handler_path;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $this->{$key} = \App\Purifier::decodeHtml($value);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        ->where(['tabid' => $tabid, 'linktype' => $type, 'linkurl' => $url, 'linkicon' => $iconpath, 'linklabel' => $label])
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                        'linkurl' => $url,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    ];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

             * @param int $tabid Module ID
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                            foreach ($rows as $row) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    foreach ($parameters as $key => $value) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $ignore = \call_user_func([$row['handler_class'], $row['handler']], $linkData);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $links[] = $instance;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

                        $params['handler'] = $handlerInfo['method'] ?? null;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

                \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Get all the link related to module based on type.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param mixed $type       String or List of types to select
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    foreach ($linksFromDb as $row) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    $instance->initialize($row);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        \vtlib\Deprecated::checkFileAccessForInclusion($row['handler_path']);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                $dataReader = (new \App\Db\Query())->from('vtiger_links')
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                if (0 == $tabid || !$exists) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linkicon' => $iconpath,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public static function deleteLink($tabid, $type, $label, $url = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

                                if (isset($rows[$tabid][$typeLink])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                        $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                    if (\is_array($type)) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        if (self::IGNORE_MODULE === $tabid) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                foreach ($type as $typ) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                            $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                    foreach ($rows[$tabid][$typeLink] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                if ($multitype) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $instance = new self();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                return $instances;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $instance->initialize($row);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $tabid;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $handler_class;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

            /** Cache (Record) the schema changes to improve performance */
        Severity: Minor
        Found in vtlib/Vtiger/Link.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/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                \App\Log::trace('Deleting Links ... DONE');
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param int    $tabid Module ID
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $db->createCommand()->delete('vtiger_links', [
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    \App\Log::trace("Deleting Link ($type - $label - $url) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    $rows = \App\Cache::get('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $linksFromDb = (new \App\Db\Query())->from('vtiger_links')->all();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $multitype = true;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

        Line exceeds 120 characters; contains 125 characters
        Open

                            $permittedTabIdList = \App\User::getCurrentUserId() ? \vtlib\Deprecated::getPermittedModuleIdList() : [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                    foreach ($row[$type] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

            public static function getAll($tabid)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                foreach ($rows[0][$type] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                        $strtemplate->assign($key, $value);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                            foreach ($permittedTabIdList as $moduleId) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            foreach ($type as $typeLink) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                    foreach ($rows[0][$typeLink] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param mixed $tabid
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $handler;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    return \App\Module::getModuleName($this->tabid);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public static $__cacheSchemaChanges = [];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param string      $type        Link Type (like DETAIL_VIEW_BASIC). Useful for grouping based on pages
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'sequence' => (int) $sequence,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $params['handler_path'] = $handlerInfo['path'] ?? null;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $params['handler_class'] = $handlerInfo['class'] ?? null;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    $db->createCommand()->insert('vtiger_links', $params)->execute();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                    foreach ($rows[$tabid] as $linkType) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                foreach ($links as $row) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        if (!$ignore) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

             * @param string|null $linkParams
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    if (!empty($handlerInfo)) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    if (!empty($linkParams)) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @param string $label Display label
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * Delete all links related to module.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Get all the links related to module.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    \App\Cache::save('AllLinks', 'ByType', $rows);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            $permittedTabIdList[] = 0;  // Added to support one link for all modules
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                        require_once $row['handler_path'];
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    if ($parameters) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    $instance = new self();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                        $rows[$row['tabid']][$row['linktype']][] = $row;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                                    $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

            public $linkurl;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $icon;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            const IGNORE_MODULE = -1;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $this->{$key} = $value;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Get module name.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        'linklabel' => $label,
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $params['params'] = $linkParams;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                    \App\Log::trace("Deleting Link ($type - $label) ... DONE");
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                $multitype = false;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                        foreach ($rows[$moduleId][$typ] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                if (isset($rows[0][$typeLink])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                                foreach ($rows[$tabid][$type] as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                if ($parameters) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    foreach ($type as $t) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                    if (!empty($row['handler_path']) && \vtlib\Deprecated::isFileAccessible($row['handler_path'])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                if (false !== $type) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            continue;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                                        $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                            if (isset($rows[$tabid][$type])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public static function getAllForExport($tabid)
        Severity: Minor
        Found in vtlib/Vtiger/Link.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/Link.php by phpcodesniffer

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

                return $links;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public $linklabel;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public $sequence;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public static function addLink($tabid, $type, $label, $url, $iconpath = '', $sequence = 0, $handlerInfo = null, $linkParams = null)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

            public static function deleteAll($tabid)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param int   $tabid      Module ID
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public static function getAllByType($tabid, $type = false, $parameters = false)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                                        $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        foreach ($linkType as $data) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                $strtemplate = new \Vtiger_StringTemplate();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                                    $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    ->where(['tabid' => $tabid])
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                        $linkData = new LinkData($instance);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                    if ($multitype) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $instances[$instance->linktype][] = $instance;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

            public function initialize($valuemap)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

                \App\Cache::delete('AllLinks', 'ByType');
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                return self::getAllByType($tabid);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                                if (isset($row[$type])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $instance->linkicon = $strtemplate->merge($instance->linkicon);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $instances[$instance->linktype] = $instance;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param int $tabid Module ID
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

             * @param array $parameters Map Key-Value pair to use for formating the link url
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                        if (self::IGNORE_MODULE === $tabid) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            if (isset($rows[0][$type])) {
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                            $links[] = $data;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                        $instance->linkurl = $strtemplate->merge($instance->linkurl);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * Extract the links of module for export.
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

                $linkData = (new \App\Db\Query())->from('vtiger_links')->where(['linkid' => $linkId])->one();
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

                return $linkData;
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

            public static function getLinkData($linkId)
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

             * @return array
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

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

             * @param int $linkId
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

                \App\Cache::save('Link', $linkId, $linkData);
        Severity: Minor
        Found in vtlib/Vtiger/Link.php by phpcodesniffer

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

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

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

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

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

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

        There are no issues that match your filters.

        Category
        Status