YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/views/InterestsConflictModal.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Missing class import via use statement (line '44', 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 '41', 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 '\App\Privilege' in method 'checkPermission'.
Open

        if ($request->isEmpty('record', true) || !\App\Privilege::isPermitted($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\Components\InterestsConflict' in method 'users'.
Open

            $viewer->assign('USERS', \App\Components\InterestsConflict::getByRecord($this->parent['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 '\App\Language' in method 'getPageTitle'.
Open

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_CONFIRMATION', $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\Privilege' in method 'checkPermission'.
Open

        if ('users' === $request->getMode() && ($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\Language' in method 'getPageTitle'.
Open

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_USERS', $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\Components\InterestsConflict' in method 'checkPermission'.
Open

        $this->parent = \App\Components\InterestsConflict::getParent($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

Avoid using static access to class '\App\Language' in method 'getPageTitle'.
Open

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_UNLOCK', $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

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

        $this->exposeMethod('users');

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

        if ($request->isEmpty('record', true) || !\App\Privilege::isPermitted($request->getModule())) {

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

            $viewer->assign('BASE_MODULE_NAME', $this->parent['moduleName']);

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

            $viewer->assign('BASE_MODULE_NAME', $this->parent['moduleName']);

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.

Add a "case default" clause to this "switch" statement.
Open

        switch ($request->getMode()) {

The requirement for a final case default clause is defensive programming. The clause should either take appropriate action, or contain a suitable comment as to why no action is taken. Even when the switch covers all current values of an enum, a default case should still be used because there is no guarantee that the enum won't be extended.

Noncompliant Code Example

switch ($param) {  //missing default clause
  case 0:
    do_something();
    break;
  case 1:
    do_something_else();
    break;
}

switch ($param) {
  default: // default clause should be the last one
    error();
    break;
  case 0:
    do_something();
    break;
  case 1:
    do_something_else();
    break;
}

Compliant Solution

switch ($param) {
  case 0:
    do_something();
    break;
  case 1:
    do_something_else();
    break;
  default:
    error();
    break;
}

See

  • MISRA C:2004, 15.0 - The MISRA C switch syntax shall be used.
  • MISRA C:2004, 15.3 - The final clause of a switch statement shall be the default clause
  • MISRA C++:2008, 6-4-3 - A switch statement shall be a well-formed switch statement.
  • MISRA C++:2008, 6-4-6 - The final clause of a switch statement shall be the default-clause
  • MISRA C:2012, 16.1 - All switch statements shall be well-formed
  • MISRA C:2012, 16.4 - Every switch statement shall have a default label
  • MISRA C:2012, 16.5 - A default label shall appear as either the first or the last switch label of a switch statement
  • MITRE, CWE-478 - Missing Default Case in Switch Statement
  • CERT, MSC01-C. - Strive for logical completeness
  • CERT, MSC01-CPP. - Strive for logical completeness

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

        $viewer->assign('SOURCE_RECORD', $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 "BASE_RECORD" 3 times.
Open

            $viewer->assign('BASE_RECORD', $this->parent['id']);

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.

Reference to undeclared property \Vtiger_InterestsConflictModal_View->successBtn
Open

                $this->successBtn = '';

Reference to undeclared class \App\Controller\Modal
Open

        return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([

Call to undeclared method \Vtiger_InterestsConflictModal_View::getViewer
Open

        $viewer = $this->getViewer($request);

Reference to undeclared property \Vtiger_InterestsConflictModal_View->modalIcon
Open

        $this->modalIcon = 'yfi yfi-confirm-conflict';

Reference to undeclared property \Vtiger_InterestsConflictModal_View->lockExit
Open

                $this->lockExit = $this->parent ? true : false;

Call to undeclared method \Vtiger_InterestsConflictModal_View::getViewer
Open

        $viewer = $this->getViewer($request);

Call to undeclared method \Vtiger_InterestsConflictModal_View::checkAndConvertJsScripts
Open

        return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([

Reference to undeclared class \App\Controller\Modal
Open

        return array_merge(parent::getModalCss($request), $this->checkAndConvertCssStyles([

Call to undeclared method \Vtiger_InterestsConflictModal_View::getViewer
Open

        $viewer = $this->getViewer($request);

Reference to undeclared class \App\Controller\Modal
Open

        parent::__construct();

Reference to undeclared property \Vtiger_InterestsConflictModal_View->dangerBtn
Open

                $this->dangerBtn = 'BTN_CLOSE';

Call to undeclared method \Vtiger_InterestsConflictModal_View::checkAndConvertCssStyles
Open

        return array_merge(parent::getModalCss($request), $this->checkAndConvertCssStyles([

Class extends undeclared class \App\Controller\Modal
Open

class Vtiger_InterestsConflictModal_View extends \App\Controller\Modal

Call to method getByRecord from undeclared class \App\Components\InterestsConflict (Did you mean class \App\Controller\Components\Action\InterestsConflict or class \App\Controller\Components\View\InterestsConflict)
Open

            $viewer->assign('USERS', \App\Components\InterestsConflict::getByRecord($this->parent['id']));

Call to method getParent from undeclared class \App\Components\InterestsConflict (Did you mean class \App\Controller\Components\Action\InterestsConflict or class \App\Controller\Components\View\InterestsConflict)
Open

        $this->parent = \App\Components\InterestsConflict::getParent($request->getInteger('record'), $request->getModule());

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function unlock(App\Request $request): void
    {
        $record = $request->getInteger('record');
        $viewer = $this->getViewer($request);
        $viewer->assign('SOURCE_RECORD', $record);
Severity: Major
Found in modules/Vtiger/views/InterestsConflictModal.php and 1 other location - About 1 hr to fix
modules/Vtiger/views/InterestsConflictModal.php on lines 81..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 107.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public function confirmation(App\Request $request): void
    {
        $record = $request->getInteger('record');
        $viewer = $this->getViewer($request);
        $viewer->assign('SOURCE_RECORD', $record);
Severity: Major
Found in modules/Vtiger/views/InterestsConflictModal.php and 1 other location - About 1 hr to fix
modules/Vtiger/views/InterestsConflictModal.php on lines 100..110

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 107.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

class Vtiger_InterestsConflictModal_View extends \App\Controller\Modal

The class Vtiger_InterestsConflictModal_View is not named in CamelCase.
Open

class Vtiger_InterestsConflictModal_View extends \App\Controller\Modal
{
    use \App\Controller\ExposeMethod;

    /** {@inheritdoc} */

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 to indent lines; tabs are not allowed
Open

        $this->exposeMethod('users');

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' === $request->getMode() && ($request->isEmpty('record') || !\App\Privilege::isPermitted($request->getModule(), 'DetailView', $request->getInteger('record')))) {

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

            case 'unlock':

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

            $viewer->assign('BASE_MODULE_NAME', $this->parent['moduleName']);

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

            $viewer->assign('BASE_RECORD', $this->parent['id']);

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

            $viewer->assign('BASE_MODULE_NAME', $this->parent['moduleName']);

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

        $viewer = $this->getViewer($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

    public function users(App\Request $request): void

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

        $viewer = $this->getViewer($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

        return array_merge(parent::getModalScripts($request), $this->checkAndConvertJsScripts([

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

            '~libraries/datatables.net-responsive/js/dataTables.responsive.js',

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

    }

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

        return array_merge(parent::getModalCss($request), $this->checkAndConvertCssStyles([

Line exceeds 120 characters; contains 180 characters
Open

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

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

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_UNLOCK', $moduleName);

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

                break;

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

                $this->successBtn = '';

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

     * Confirmation modal.

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

     *

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

        $record = $request->getInteger('record');

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

        if ($this->parent) {

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

        $viewer->view('Modals/InterestsConflictUsers.tpl', $request->getModule());

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

        if ($request->isEmpty('record', true) || !\App\Privilege::isPermitted($request->getModule())) {

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

            case 'confirmation':

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

            '~libraries/datatables.net/js/jquery.dataTables.js',

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

    /** {@inheritdoc} */

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

    public function getPageTitle(App\Request $request)

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

     * Users list modal.

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

        $viewer->assign('SOURCE_RECORD', $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

    }

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

     * Unlock modal.

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

        $record = $request->getInteger('record');

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

            '~libraries/datatables.net-bs4/js/dataTables.bootstrap4.js',

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

            '~libraries/datatables.net-bs4/css/dataTables.bootstrap4.css',

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

        parent::__construct();

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

        $this->parent = \App\Components\InterestsConflict::getParent($request->getInteger('record'), $request->getModule());

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

        switch ($request->getMode()) {

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

                $this->modalSize = 'modal-lg';

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

        if ($this->parent) {

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

        }

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

        $this->exposeMethod('unlock');

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

        }

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

        $moduleName = $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

        $viewer = $this->getViewer($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

        $viewer->assign('SOURCE_RECORD', $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

     * @return void

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

            $viewer->assign('USERS', \App\Components\InterestsConflict::getByRecord($this->parent['id']));

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

    public function getModalCss(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

        $this->exposeMethod('confirmation');

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

    public function checkPermission(App\Request $request)

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

        $this->modalIcon = 'yfi yfi-confirm-conflict';

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

                break;

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

                break;

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

    public $modalSize = '';

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

    {

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

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_CONFIRMATION', $moduleName);

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

        $viewer->view('Modals/InterestsConflictConfirmation.tpl', $request->getModule());

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

        if ($this->parent) {

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 $parent;

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

        $pageTitle = '';

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

                $this->dangerBtn = 'BTN_CLOSE';

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 unlock(App\Request $request): void

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

            '~libraries/datatables.net-responsive-bs4/js/responsive.bootstrap4.js',

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

            case 'users':

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

                $this->showFooter = true;

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

        return $pageTitle;

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

            $viewer->assign('BASE_RECORD', $this->parent['id']);

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

            $viewer->assign('BASE_RECORD', $this->parent['id']);

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

    public function getModalScripts(App\Request $request)

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

    public $showFooter = false;

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

                $pageTitle = \App\Language::translate('LBL_INTERESTS_CONFLICT_USERS', $moduleName);

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 App\Request $request

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

            $viewer->assign('BASE_MODULE_NAME', $this->parent['moduleName']);

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

        $viewer->view('Modals/InterestsConflictUnlock.tpl', $request->getModule());

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

            '~libraries/datatables.net-responsive-bs4/css/responsive.bootstrap4.css',

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

    /** @var array|null Parent record id. */

Line exceeds 120 characters; contains 124 characters
Open

        $this->parent = \App\Components\InterestsConflict::getParent($request->getInteger('record'), $request->getModule());

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

                $this->lockExit = $this->parent ? true : false;

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

    public function confirmation(App\Request $request): void

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

        $viewer->assign('SOURCE_RECORD', $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

        }

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

    {

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

    /**

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

        $record = $request->getInteger('record');

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

        ]));

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

class Vtiger_InterestsConflictModal_View extends \App\Controller\Modal

There are no issues that match your filters.

Category
Status