YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/PDF/models/Module.php

Summary

Maintainability
B
5 hrs
Test Coverage
F
13%

Function getTemplateType has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getTemplateType(Vtiger_PDF_Model $template)
    {
        $matches = [];
        $content = $template->get('body_content');
        preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);
Severity: Minor
Found in modules/Settings/PDF/models/Module.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

Avoid using static access to class 'Vtiger_PDF_Model' in method 'getTemplatesByModule'.
Open

        return Vtiger_PDF_Model::getTemplatesByModule($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 'Vtiger_Module_Model' in method 'getSupportedModules'.
Open

        $moduleModels = Vtiger_Module_Model::getAll([0, 2]);

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

        'default' => 'LBL_DEFAULT_TPL',

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

        'secondary_name' => 'LBL_SECONDARY_NAME',

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

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

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

        'status' => 'LBL_STATUS',

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

        'page_format' => 'LBL_PAGE_FORMAT',

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

        'generator' => 'LBL_GENERATOR_ENGINE',

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

        'primary_name' => 'LBL_PRIMARY_NAME',

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

        'module_name' => 'Module',

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 constant VARIABLE_REGEX from undeclared class \App\TextParser (Did you mean class \Tests\App\TextParser)
Open

        preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);
Severity: Critical
Found in modules/Settings/PDF/models/Module.php by phan

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

    public static function getPageFormats()
    {
        return [
            '4A0',
            '2A0',
Severity: Major
Found in modules/Settings/PDF/models/Module.php and 1 other location - About 4 hrs to fix
app/Pdf/Pdf.php on lines 25..46

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 173.

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

Avoid excessively long variable names like $supportedModuleModels. Keep variable name length under 20.
Open

        $supportedModuleModels = [];

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

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

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

class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model

The class Settings_PDF_Module_Model is not named in CamelCase.
Open

class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model
{
    public $baseTable = 'a_yf_pdf';
    public $baseIndex = 'pdfid';
    public $listFields = [

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

     *

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

        return 'index.php?module=PDF&parent=Settings&view=List';

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

    public static function getCreateRecordUrl()

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

    }

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

                $supportedModuleModels[$tabId] = $moduleModel;

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

                return self::$step1Fields;

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

    }

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

            'B', //    'B' format paperback size 128x198mm

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

                $type = Vtiger_PDF_Model::TEMPLATE_TYPE_DYNAMIC;

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

                $type = Vtiger_PDF_Model::TEMPLATE_TYPE_SUMMARY;

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

        'watermark_type', 'watermark_text', 'watermark_angle', 'template_members',    'watermark_image',    'one_pdf',    'type',   'styles',

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

            'RA0', 'RA1', 'RA2', 'RA3', 'RA4',

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

     * @param string $moduleName - module name for which template was created

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

     *

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

     * Get template type.

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

    {

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

            case 2:

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

            'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10',

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

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

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

    public static $parent = 'Settings';

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

    public static function getPageFormats()

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

     * @param Vtiger_PDF_Model $template

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

        $matches = [];

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

    public static $step3Fields = ['conditions'];

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

        $moduleModels = Vtiger_Module_Model::getAll([0, 2]);

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

                return self::$step2Fields;

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

            case 1:

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

            'LEGAL',

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

            'TABLOID',

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

            'A', //    'A' format paperback size 111x178mm

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

     * @return array of template record models

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

            case 3:

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

            '2A0',

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

    public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle'];

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

    }

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

    public static function getSupportedModules()

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

        $supportedModuleModels = [];

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

        return [

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

            'EXECUTIVE',

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

        preg_match_all(\App\TextParser::VARIABLE_REGEX, $content, $matches, PREG_SET_ORDER);

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

            }

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

     * @return string - url

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

    public static function getDefaultUrl()

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

    {

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

        return 'index.php?module=PDF&parent=Settings&view=Import';

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

            'LETTER',

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

            'FOLIO',

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

    public function getTemplatesByModule($moduleName)

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

    {

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

    public static function getTemplateType(Vtiger_PDF_Model $template)

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

        $content = $template->get('body_content');

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

            if ('custom' === $match[1] && (\in_array($match[2], ['UserGroup|OSSTimeControl', 'List|OSSTimeControl', 'DetailedList|OSSTimeControl']) || false !== strpos($match[2], 'RecordsList'))) {

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

    ];

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

     * Function to get the url for default view of the module.

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

     */

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

     * @return string - url

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

     */

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

    public static function getCreateViewUrl()

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

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

    /**

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

     * @return int template type

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

                break;

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

    public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content',  'styles'];

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

    public static function getImportViewUrl()

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

        return Vtiger_PDF_Model::getTemplatesByModule($moduleName);

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

        'watermark_type', 'watermark_text', 'watermark_angle', 'template_members',    'watermark_image',    'one_pdf',    'type',   'styles',

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

    {

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

            'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10',

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

     */

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

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

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

        'watermark_type', 'watermark_text', 'watermark_angle', 'template_members',    'watermark_image',    'one_pdf',    'type',   'styles',

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

    public static $uploadPath = 'storage/Pdf/watermark/';

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

            if ($moduleModel->isEntityModule()) {

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

    }

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

    public static function getFieldsByStep($step = 1)

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

            default:

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

            'SRA0', 'SRA1', 'SRA2', 'SRA3', 'SRA4',

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

            'DEMY', //    'Demy' format paperback size 135x216mm

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

    {

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

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

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

            }

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

            'ROYAL', //    'Royal' format paperback size 153x234mm

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

        'watermark_type', 'watermark_text', 'watermark_angle', 'template_members',    'watermark_image',    'one_pdf',    'type',   'styles',

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

    /**

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

        return 'index.php?module=PDF&parent=Settings&view=Edit';

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

            'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10',

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

    public static $module = 'PDF';

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

        foreach ($moduleModels as $tabId => $moduleModel) {

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

        switch ($step) {

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

                return self::$step3Fields;

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

            '4A0',

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

            'LEDGER',

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

     * Returns template records by module name.

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

    }

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

        foreach ($matches as $match) {

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

            if ('custom' === $match[1] && false !== strpos($match[2], 'DynamicInventoryColumnsTable')) {

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

        return $type;

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

    protected $viewToPicklistValue = ['Detail' => 'PLL_DETAILVIEW', 'List' => 'PLL_LISTVIEW'];

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

     * Function to get the url for create view of the module.

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

        return "javascript:Settings_PDF_List_Js.triggerCreate('" . self::getCreateRecordUrl() . "')";

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

        }

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

        $type = Vtiger_PDF_Model::TEMPLATE_TYPE_STANDARD;

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

                break;

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

    }

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

        'generator' => 'LBL_GENERATOR_ENGINE',

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

        'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation',

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

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

Line exceeds 120 characters; contains 489 characters
Open

    public static $step1Fields = ['status', 'generator', 'primary_name', 'secondary_name', 'module_name', 'metatags_status', 'meta_subject', 'meta_title', 'meta_author', 'meta_keywords', 'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation', 'language', 'filename', 'visibility', 'default', 'one_pdf', 'template_members', 'watermark_type', 'watermark_text', 'watermark_image', 'watermark_angle'];

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

    public $baseTable = 'a_yf_pdf';

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

    public static $allFields = [

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

        'status' => 'LBL_STATUS',

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

        'default' => 'LBL_DEFAULT_TPL',

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

        'module_name' => 'Module',

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

        'secondary_name' => 'LBL_SECONDARY_NAME',

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 $listFields = [

Line exceeds 120 characters; contains 125 characters
Open

        'language',    'filename',    'visibility', 'default',    'header_content', 'body_content', 'footer_content', 'conditions',

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

    public $baseIndex = 'pdfid';

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

        'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title',

Line exceeds 120 characters; contains 127 characters
Open

    public static $step2Fields = ['module_name', 'header_content', 'module_name', 'body_content', 'footer_content',  'styles'];

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

        'page_format' => 'LBL_PAGE_FORMAT',

Line exceeds 120 characters; contains 197 characters
Open

            if ('custom' === $match[1] && (\in_array($match[2], ['UserGroup|OSSTimeControl', 'List|OSSTimeControl', 'DetailedList|OSSTimeControl']) || false !== strpos($match[2], 'RecordsList'))) {

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

        'primary_name' => 'LBL_PRIMARY_NAME',

Line exceeds 120 characters; contains 160 characters
Open

        'module_name', 'status', 'generator', 'primary_name', 'secondary_name', 'meta_author', 'meta_keywords', 'metatags_status', 'meta_subject', 'meta_title',

Line exceeds 120 characters; contains 155 characters
Open

        'page_format', 'margin_chkbox', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'header_height', 'footer_height', 'page_orientation',

Line exceeds 120 characters; contains 135 characters
Open

        'watermark_type', 'watermark_text', 'watermark_angle', 'template_members',    'watermark_image',    'one_pdf',    'type',   'styles',

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

class Settings_PDF_Module_Model extends Settings_Vtiger_Module_Model

There are no issues that match your filters.

Category
Status