YetiForceCompany/YetiForceCRM

View on GitHub
modules/KnowledgeBase/actions/KnowledgeBaseAjax.php

Summary

Maintainability
A
3 hrs
Test Coverage
F
0%

Method detail has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function detail(App\Request $request)
    {
        $recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());
        if ('PLL_PRESENTATION' === $recordModel->get('knowledgebase_view')) {
            $content = [];
Severity: Minor
Found in modules/KnowledgeBase/actions/KnowledgeBaseAjax.php - About 1 hr to fix

    Function detail has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        public function detail(App\Request $request)
        {
            $recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());
            if ('PLL_PRESENTATION' === $recordModel->get('knowledgebase_view')) {
                $content = [];
    Severity: Minor
    Found in modules/KnowledgeBase/actions/KnowledgeBaseAjax.php - About 1 hr 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 class KnowledgeBase_KnowledgeBaseAjax_Action has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13.
    Open

    class KnowledgeBase_KnowledgeBaseAjax_Action extends \App\Controller\Action
    {
        use \App\Controller\ExposeMethod;
        /**
         * Detail query conditions.

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

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

            $response = new Vtiger_Response();

    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 '217', column '25').
    Open

            $queryGenerator = new \App\QueryGenerator('ModComments');

    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 '94', column '19').
    Open

            $response = new Vtiger_Response();

    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 '153', column '19').
    Open

            $response = new Vtiger_Response();

    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 '42', column '14').
    Open

                throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);

    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 '117', column '19').
    Open

            $response = new Vtiger_Response();

    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 '39', column '14').
    Open

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Avoid using static access to class '\Vtiger_Util_Helper' in method 'detail'.
    Open

                'short_createdtime' => \Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('createdtime')),

    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 '\Vtiger_Util_Helper' in method 'detail'.
    Open

                'short_modifiedtime' => \Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime')),

    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\Privilege' in method 'getRelatedComments'.
    Open

            if (!\App\Privilege::isPermitted('ModComments')) {

    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\Fields\Owner' in method 'getRelatedComments'.
    Open

                    'userName' => App\Fields\Owner::getLabel($row['assigned_user_id']),

    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 '\Vtiger_Util_Helper' in method 'getRelatedComments'.
    Open

                    'modifiedShort' => \Vtiger_Util_Helper::formatDateDiffInStrings($row['modifiedtime']),

    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\Privilege' in method 'checkPermission'.
    Open

            if (!$request->isEmpty('record') && !\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

    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\Fields\DateTime' in method 'getRelated'.
    Open

                    'full_time' => App\Fields\DateTime::formatToDisplay($relatedRecordModel->get('modifiedtime')),

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

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

    Avoid using static access to class '\App\User' in method 'getRelatedComments'.
    Open

                    'avatar' => \App\User::getImageById($row['assigned_user_id']),

    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 'Vtiger_Record_Model' in method 'detail'.
    Open

            $recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());

    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 detail uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $content = $recordModel->getDisplayValue('content', false, true);
            }

    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 'Vtiger_RelationListView_Model' in method 'getRelatedRecords'.
    Open

            $relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $moduleName);

    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 detail uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                    } else {
                        $content[] = $fieldModel->getDisplayValue(substr($value, 16), $recordModel->getId(), $recordModel, true);
                    }

    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 'KnowledgeBase_KnowledgeBase_Model' in method 'getModel'.
    Open

            return KnowledgeBase_KnowledgeBase_Model::getInstance($request->getModule());

    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\Fields\Tree' in method 'categories'.
    Open

                $row['parent'] = App\Fields\Tree::getParentIdx($row);

    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\Language' in method 'detail'.
    Open

                $relatedModules[$relatedModuleName] = App\Language::translate($relatedModuleName, $relatedModuleName);

    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 '\Vtiger_Util_Helper' in method 'getRelated'.
    Open

                    'short_time' => \Vtiger_Util_Helper::formatDateDiffInStrings($relatedRecordModel->get('modifiedtime')),

    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 'Vtiger_RelationListView_Model' in method 'getRelated'.
    Open

            $relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $recordModel->getModuleName());

    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\Fields\DateTime' in method 'getRelatedComments'.
    Open

                    'modifiedFull' => App\Fields\DateTime::formatToDisplay($row['modifiedtime']),

    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\Privilege' in method 'getRelatedRecords'.
    Open

            if (!\App\Privilege::isPermitted($moduleName)) {

    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\Language' in method 'categories'.
    Open

                $row['label'] = \App\Language::translate($row['label'], $request->getModule());

    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 "record" 3 times.
    Open

            if (!$request->isEmpty('record') && !\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

    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 "ModComments" 4 times.
    Open

                if ('ModComments' !== $relatedModuleName && $request->getModule() !== $relatedModuleName) {

    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 "modifiedtime" 8 times.
    Open

                'full_modifiedtime' => $recordModel->getDisplayValue('modifiedtime'),

    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 "category" 9 times.
    Open

            if (!$request->isEmpty('category')) {

    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 "value" 3 times.
    Open

            if (!$request->isEmpty('value')) {

    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 "assigned_user_id" 9 times.
    Open

                'assigned_user_id' => $recordModel->getDisplayValue('assigned_user_id', false, true),

    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 "introduction" 5 times.
    Open

                'introduction' => $recordModel->getDisplayValue('introduction', false, true),

    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 "subject" 5 times.
    Open

                'subject' => $recordModel->get('subject'),

    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 "content" 4 times.
    Open

                $fieldModel = $recordModel->getField('content');

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

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

    Call to method createQuery from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $query = $queryGenerator->createQuery()->orderBy(['id' => SORT_DESC]);

    Call to method getCategories on non-class type void
    Open

            foreach ($treeModel->getCategories() as $row) {

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

                    'avatar' => \App\User::getImageById($row['assigned_user_id']),

    Call with 1 arg(s) to \Vtiger_Record_Model::getDisplayName() which only takes 0 arg(s) defined at /code/modules/Vtiger/models/Record.php:401
    Open

                    $name[] = $relatedRecordModel->getDisplayName($fieldName);

    Call to method getData on non-class type void
    Open

            $response->setResult($treeModel->getData());

    Call to method __construct from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $queryGenerator = new \App\QueryGenerator('ModComments');

    Call to method set on non-class type void
    Open

                $treeModel->set('value', $request->getByType('value', 'Text'));

    Call to method setSourceRecord from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $queryGenerator->setSourceRecord($recordId);

    Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $relationListView->getQueryGenerator()->addNativeCondition($this->queryCondition);

    Argument 1 (mixed) is string but \Users_Privileges_Model::hasModulePermission() takes int defined at /code/modules/Users/models/Privileges.php:101
    Open

            if (!Users_Privileges_Model::getCurrentUserPrivilegesModel()->hasModulePermission($request->getModule())) {

    Call to method set on non-class type void
    Open

                    $treeModel->set('parentCategory', $request->getByType('category', 'Alnum'));

    Returning type \KnowledgeBase_KnowledgeBase_Model|\self but getModel() is declared to return void
    Open

            return KnowledgeBase_KnowledgeBase_Model::getInstance($request->getModule());

    Call to method set on non-class type void
    Open

                $treeModel->set('parentCategory', $request->getByType('category', 'Alnum'));

    Call to method setFields from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $queryGenerator->setFields(['modifiedtime', 'id',    'assigned_user_id', 'commentcontent']);

    Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

            $queryGenerator->addNativeCondition(['related_to' => $recordId]);

    Cannot assign void return value
    Open

            $treeModel = $this->getModel($request);

    Cannot assign void return value
    Open

                $treeModel = $this->getModel($request);

    Call to method getLabel from undeclared class \App\Fields\Owner
    Open

                    'userName' => App\Fields\Owner::getLabel($row['assigned_user_id']),

    Cannot assign void return value
    Open

            $treeModel = $this->getModel($request);

    Call to method search on non-class type void
    Open

                $rows = $treeModel->search();

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class KnowledgeBase_KnowledgeBaseAjax_Action extends \App\Controller\Action

    The class KnowledgeBase_KnowledgeBaseAjax_Action is not named in CamelCase.
    Open

    class KnowledgeBase_KnowledgeBaseAjax_Action extends \App\Controller\Action
    {
        use \App\Controller\ExposeMethod;
        /**
         * Detail query conditions.

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

    Spaces must be used for alignment; tabs are not allowed
    Open

            $queryGenerator->setSourceRecord($recordId);

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'comment' => $row['commentcontent'],

    Spaces must be used for alignment; tabs are not allowed
    Open

            $queryGenerator->addNativeCondition(['related_to' => $recordId]);

    Spaces must be used for alignment; tabs are not allowed
    Open

            $queryGenerator->setFields(['modifiedtime', 'id',    'assigned_user_id', 'commentcontent']);

    Spaces must be used for alignment; tabs are not allowed
    Open

            while ($row = $dataReader->read()) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                $related[$row['id']] = [

    Spaces must be used for alignment; tabs are not allowed
    Open

            $related = [];

    Spaces must be used for alignment; tabs are not allowed
    Open

            $query = $queryGenerator->createQuery()->orderBy(['id' => SORT_DESC]);

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'userid' => $row['assigned_user_id'],

    Spaces must be used for alignment; tabs are not allowed
    Open

                foreach ($fields as $fieldName) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            if (!\App\Privilege::isPermitted($moduleName)) {

    Spaces must be used for alignment; tabs are not allowed
    Open

                    $name[] = $relatedRecordModel->getDisplayName($fieldName);

    Spaces must be used for alignment; tabs are not allowed
    Open

            return $related;

    Spaces must be used for alignment; tabs are not allowed
    Open

            $query->limit(50);

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'commentId' => $row['id'],

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'modifiedShort' => \Vtiger_Util_Helper::formatDateDiffInStrings($row['modifiedtime']),

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

                return [];

    Spaces must be used for alignment; tabs are not allowed
    Open

            foreach ($relationListView->getAllEntries() as $key => $relatedRecordModel) {

    Spaces must be used for alignment; tabs are not allowed
    Open

            return $related;

    Spaces must be used for alignment; tabs are not allowed
    Open

        {

    Spaces must be used for alignment; tabs are not allowed
    Open

                $name = [];

    Spaces must be used for alignment; tabs are not allowed
    Open

            $dataReader = $query->createCommand()->query();

    Spaces must be used for alignment; tabs are not allowed
    Open

                ];

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

            $fields = $relationListView->getRelatedModuleModel()->getNameFields();

    Spaces must be used for alignment; tabs are not allowed
    Open

                }

    Spaces must be used for alignment; tabs are not allowed
    Open

            }

    Spaces must be used for alignment; tabs are not allowed
    Open

        }

    Spaces must be used for alignment; tabs are not allowed
    Open

        /**

    Spaces must be used for alignment; tabs are not allowed
    Open

            $relationListView->setFields(array_merge(['id'], $fields));

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'userName' => App\Fields\Owner::getLabel($row['assigned_user_id']),

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @return array

    Spaces must be used for alignment; tabs are not allowed
    Open

            $relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $moduleName);

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param Vtiger_Record_Model $recordModel

    Spaces must be used for alignment; tabs are not allowed
    Open

            $related = [];

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'avatar' => \App\User::getImageById($row['assigned_user_id']),

    Spaces must be used for alignment; tabs are not allowed
    Open

        }

    Spaces must be used for alignment; tabs are not allowed
    Open

         */

    Spaces must be used for alignment; tabs are not allowed
    Open

         * Get related records.

    Spaces must be used for alignment; tabs are not allowed
    Open

         *

    Spaces must be used for alignment; tabs are not allowed
    Open

         * @param string              $moduleName

    Spaces must be used for alignment; tabs are not allowed
    Open

        public function getRelatedRecords(Vtiger_Record_Model $recordModel, string $moduleName): array

    Spaces must be used for alignment; tabs are not allowed
    Open

                    'modifiedFull' => App\Fields\DateTime::formatToDisplay($row['modifiedtime']),

    Spaces must be used for alignment; tabs are not allowed
    Open

                $related[$key] = implode(' | ', $name);

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

            $this->exposeMethod('list');

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

        }

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

         */

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

         *

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

        {

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

            $response = new Vtiger_Response();

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

        use \App\Controller\ExposeMethod;

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

            parent::__construct();

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

            $this->exposeMethod('detail');

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

                $treeModel->set('parentCategory', $request->getByType('category', 'Alnum'));

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

         * Get categories for knowledge base.

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

         * @var string[]

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

        protected $queryCondition = ['knowledgebase_status' => 'PLL_ACCEPTED'];

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

         * Get KnowledgeBase model instance.

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

        }

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

         *

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

         */

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

            $response->setResult($treeModel->getData());

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

                throw new \App\Exceptions\NoPermittedToRecord('ERR_NO_PERMISSIONS_FOR_THE_RECORD', 406);

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

         * @param App\Request $request

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

        /**

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

            $response->emit();

    Line exceeds 120 characters; contains 144 characters
    Open

            if (!$request->isEmpty('record') && !\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

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

        /**

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

         * Detail query conditions.

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

         *

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

        /**

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

            }

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

        public function __construct()

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

        {

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

         */

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

         * Constructor.

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

            $this->exposeMethod('categories');

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

            }

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

         *

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

         * Get data for knowledge base.

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

         * @param App\Request $request

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

        }

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

            if (!Users_Privileges_Model::getCurrentUserPrivilegesModel()->hasModulePermission($request->getModule())) {

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

         *

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

        {

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

        }

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

        /** {@inheritdoc} */

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);

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

         *

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

         */

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

                $rows = $treeModel->search();

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

         * Details knowledge base.

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

                foreach (explode('<div style="page-break-after:always;"><span style="display:none;">', $recordModel->get('content')) as $key => $value) {

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

                }

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

        /**

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

        /**

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

         * @param int $recordId

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

            if (!$request->isEmpty('record') && !\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record'))) {

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

        /**

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

         * @param App\Request $request

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

            $treeModel = $this->getModel($request);

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

                ],

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

                'translations' => $relatedModules

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

         * @param Vtiger_Record_Model $recordModel

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

         *

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

            }

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

                if (!$request->isEmpty('category')) {

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

        public function detail(App\Request $request)

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

            $response = new Vtiger_Response();

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

                'subject' => $recordModel->get('subject'),

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

                'view' => $recordModel->get('knowledgebase_view'),

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

                'category' => $recordModel->getDisplayValue('category'),

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

                'related' => [

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

                    'assigned_user_id' => $relatedRecordModel->getDisplayValue('assigned_user_id'),

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

                return [];

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

        {

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

        public function list(App\Request $request)

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

            if (!$request->isEmpty('category')) {

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

                $row['label'] = \App\Language::translate($row['label'], $request->getModule());

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

        {

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

            $rows = [];

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

        {

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

                $content = $recordModel->getDisplayValue('content', false, true);

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

                $relatedModuleName = $value->get('relatedModuleName');

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

                    'subject' => $relatedRecordModel->get('subject'),

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

                    'short_time' => \Vtiger_Util_Helper::formatDateDiffInStrings($relatedRecordModel->get('modifiedtime')),

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

            $queryGenerator->setFields(['modifiedtime', 'id',    'assigned_user_id', 'commentcontent']);

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

                unset($row['templateid'], $row['depth'], $row['state'], $row['name']);

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

         * Search for knowledge base.

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

         *

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

                $treeModel->set('value', $request->getByType('value', 'Text'));

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

                    ],

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

         * Get related records.

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

         *

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

            foreach ($relationListView->getAllEntries() as $key => $relatedRecordModel) {

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

        public function checkPermission(App\Request $request)

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

        public function getModel(App\Request $request)

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

         * @return void

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

            }

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

         *

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

                    if (0 === $key) {

    Line exceeds 120 characters; contains 125 characters
    Open

                        $content[] = $fieldModel->getDisplayValue(substr($value, 16), $recordModel->getId(), $recordModel, true);

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

         * @return array

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

        {

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

            }

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

         *

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

         * @return void

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

         */

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

        }

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

            $this->exposeMethod('search');

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

         * @param App\Request $request

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

            return KnowledgeBase_KnowledgeBase_Model::getInstance($request->getModule());

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

                $treeModel = $this->getModel($request);

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

            $treeModel = $this->getModel($request);

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

                }

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

        /**

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

            foreach ($treeModel->getCategories() as $row) {

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

                    }

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

                    $treeModel->set('parentCategory', $request->getByType('category', 'Alnum'));

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

                'content' => $content,

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

            $response = new Vtiger_Response();

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

            ]);

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

            $response->emit();

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

         *

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

        /**

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

         * @return void

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

         */

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

            } else {

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

            }

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

            $response->setResult([

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

                'introduction' => $recordModel->getDisplayValue('introduction', false, true),

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

        }

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

            $relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $recordModel->getModuleName());

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

                    'introduction' => $relatedRecordModel->getDisplayValue('introduction'),

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

            }

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

                $fieldModel = $recordModel->getField('content');

    Line exceeds 120 characters; contains 149 characters
    Open

                foreach (explode('<div style="page-break-after:always;"><span style="display:none;">', $recordModel->get('content')) as $key => $value) {

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

            $relatedModules = $relatedRecords = [];

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

                    $relatedRecords[$relatedModuleName] = $this->getRelatedRecords($recordModel, $relatedModuleName);

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

                'accountName' => $recordModel->getDisplayValue('accountid', false, true),

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

            if (!\App\Privilege::isPermitted('ModComments')) {

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

        {

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

            $response->setResult($categories);

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

         *

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

            $response->setResult($rows);

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

            $recordModel = Vtiger_Record_Model::getInstanceById($request->getInteger('record'), $request->getModule());

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

            }

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

                'short_modifiedtime' => \Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('modifiedtime')),

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

            $relationListView->getQueryGenerator()->addNativeCondition($this->queryCondition);

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

            $related = [];

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

                ];

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

                $row['parentTree'] = explode('::', $row['parentTree']);

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

                'full_modifiedtime' => $recordModel->getDisplayValue('modifiedtime'),

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

            }

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

                $row['parent'] = App\Fields\Tree::getParentIdx($row);

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

                $categories[$row['tree']] = $row;

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

                $content = [];

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

                }

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

                'short_createdtime' => \Vtiger_Util_Helper::formatDateDiffInStrings($recordModel->get('createdtime')),

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

                    'base' => [

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

                        'Articles' => $this->getRelated($recordModel),

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

            $response->emit();

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

            $relationListView->setFields(['id', 'subject', 'introduction', 'assigned_user_id', 'category', 'modifiedtime']);

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

                $related[$key] = [

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

        /**

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

            foreach ($recordModel->getModule()->getRelations() as $value) {

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

                $relatedModules[$relatedModuleName] = App\Language::translate($relatedModuleName, $relatedModuleName);

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

                    'dynamic' => $relatedRecords

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

        public function getRelated(Vtiger_Record_Model $recordModel): array

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

            if (!$request->isEmpty('value')) {

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

         *

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

            if ('PLL_PRESENTATION' === $recordModel->get('knowledgebase_view')) {

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

                        $content[] = $fieldModel->getDisplayValue($value, $recordModel->getId(), $recordModel, true);

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

                'accountId' => $recordModel->get('accountid'),

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

                    'full_time' => App\Fields\DateTime::formatToDisplay($relatedRecordModel->get('modifiedtime')),

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

         */

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

            $queryGenerator = new \App\QueryGenerator('ModComments');

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

        public function search(App\Request $request)

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

                    } else {

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

                if ('ModComments' !== $relatedModuleName && $request->getModule() !== $relatedModuleName) {

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

         */

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

                    'category' => $relatedRecordModel->get('category'),

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

        }

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

         *

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

         * @return void

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

         */

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

        public function categories(App\Request $request)

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

            $categories = [];

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

            $response = new Vtiger_Response();

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

            $response->emit();

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

         * @return void

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

        }

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

         * @param App\Request $request

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

                        $content[] = $fieldModel->getDisplayValue(substr($value, 16), $recordModel->getId(), $recordModel, true);

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

                'assigned_user_id' => $recordModel->getDisplayValue('assigned_user_id', false, true),

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

                'full_createdtime' => $recordModel->getDisplayValue('createdtime'),

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

                        'ModComments' => $this->getRelatedComments($recordModel->getId()),

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

        {

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

            return $related;

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

         * Get related comments.

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

         * @return array

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

        public function getRelatedComments(int $recordId): array

    Class name "KnowledgeBase_KnowledgeBaseAjax_Action" is not in camel caps format
    Open

    class KnowledgeBase_KnowledgeBaseAjax_Action extends \App\Controller\Action

    There are no issues that match your filters.

    Category
    Status