YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/PDF/actions/Save.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
0%

saveWatermarkImage accesses the super-global variable $_FILES.
Open

    public function saveWatermarkImage(Vtiger_PDF_Model $pdfModel)
    {
        if (empty($_FILES['watermark_image_file'])) {
            return '';
        }
Severity: Minor
Found in modules/Settings/PDF/actions/Save.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

saveWatermarkImage accesses the super-global variable $_FILES.
Open

    public function saveWatermarkImage(Vtiger_PDF_Model $pdfModel)
    {
        if (empty($_FILES['watermark_image_file'])) {
            return '';
        }
Severity: Minor
Found in modules/Settings/PDF/actions/Save.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Function process has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function process(App\Request $request)
    {
        $step = $request->getByType('step', 2);
        if ($request->isEmpty('record', true)) {
            $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
Severity: Minor
Found in modules/Settings/PDF/actions/Save.php - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method process has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function process(App\Request $request)
    {
        $step = $request->getByType('step', 2);
        if ($request->isEmpty('record', true)) {
            $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
Severity: Minor
Found in modules/Settings/PDF/actions/Save.php - About 1 hr to fix

    The method process() has an NPath complexity of 272. The configured NPath complexity threshold is 200.
    Open

        public function process(App\Request $request)
        {
            $step = $request->getByType('step', 2);
            if ($request->isEmpty('record', true)) {
                $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    NPathComplexity

    Since: 0.1

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

    Example

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

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

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

        public function process(App\Request $request)
        {
            $step = $request->getByType('step', 2);
            if ($request->isEmpty('record', true)) {
                $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    CyclomaticComplexity

    Since: 0.1

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

    Example

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

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

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

        public function process(App\Request $request)
    Severity: Critical
    Found in modules/Settings/PDF/actions/Save.php by sonar-php

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

    See

    Missing class import via use statement (line '34', column '14').
    Open

                throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||watermark_image_file', 406);
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Missing class import via use statement (line '37', column '14').
    Open

                throw new \App\Exceptions\AppException('ERR_CREATE_FILE_FAILURE');
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

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

            $response = new Vtiger_Response();
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Avoid using static access to class 'Settings_PDF_Record_Model' in method 'process'.
    Open

            Settings_PDF_Record_Model::transformAdvanceFilterToWorkFlowFilter($pdfModel);
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                    } else {
                        $value = implode(',', $value);
                    }
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

            } else {
                $pdfModel = Vtiger_PDF_Model::getInstanceById($request->getInteger('record'), $request->getByType('module_name', 2));
            }
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Fields\File' in method 'saveWatermarkImage'.
    Open

            $fileInstance = \App\Fields\File::loadFromRequest($_FILES['watermark_image_file']);
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_PDF_Record_Model' in method 'process'.
    Open

                $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                $pdfModel = Vtiger_PDF_Model::getInstanceById($request->getInteger('record'), $request->getByType('module_name', 2));
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_PDF_Module_Model' in method 'process'.
    Open

            $stepFields = Settings_PDF_Module_Model::getFieldsByStep($step);
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_PDF_Record_Model' in method 'process'.
    Open

            Settings_PDF_Record_Model::save($pdfModel, $step);
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                } else {
                    $value = $request->get($field);
                }
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

                    if ('conditions' === $field) {
    Severity: Critical
    Found in modules/Settings/PDF/actions/Save.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Define a constant instead of duplicating this literal "watermark_image" 5 times.
    Open

            if ($pdfModel->get('watermark_image') !== $targetFile) {
    Severity: Critical
    Found in modules/Settings/PDF/actions/Save.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Define a constant instead of duplicating this literal "module_name" 4 times.
    Open

                $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));
    Severity: Critical
    Found in modules/Settings/PDF/actions/Save.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    @throws type of process has undeclared type \yii\db\Exception (Did you mean class \Exception)
    Open

        public function process(App\Request $request)
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phan

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

                \App\Db::getInstance('admin')
    Severity: Critical
    Found in modules/Settings/PDF/actions/Save.php by phan

    Call with 2 arg(s) to \Vtiger_PDF_Model::getInstanceById() which only takes 1 arg(s) defined at /code/modules/Vtiger/models/PDF.php:260
    Open

                $pdfModel = Vtiger_PDF_Model::getInstanceById($request->getInteger('record'), $request->getByType('module_name', 2));

    @throws type of saveWatermarkImage has undeclared type \yii\db\Exception (Did you mean class \Exception)
    Open

        public function saveWatermarkImage(Vtiger_PDF_Model $pdfModel)
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phan

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

    class Settings_PDF_Save_Action extends Settings_Vtiger_Index_Action

    The class Settings_PDF_Save_Action is not named in CamelCase.
    Open

    class Settings_PDF_Save_Action extends Settings_Vtiger_Index_Action
    {
        /**
         * Save watermark image.
         *
    Severity: Minor
    Found in modules/Settings/PDF/actions/Save.php by phpmd

    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

            }

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

            if ($pdfModel->get('watermark_image') !== $targetFile) {

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

                    ->update('a_#__pdf', ['watermark_image' => $targetFile], ['pdfid' => $templateId])

    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 ($stepFields as $field) {

    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 (!$fileInstance->validateAndSecure('image')) {

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

            return $targetFile;

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

         * @throws \yii\db\Exception

    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 '';

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

         */

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

         * Save watermark image.

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

                    ->execute();

    Line exceeds 120 characters; contains 129 characters
    Open

                $pdfModel = Vtiger_PDF_Model::getInstanceById($request->getInteger('record'), $request->getByType('module_name', 2));

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

        {

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

                throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||watermark_image_file', 406);

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

                \App\Db::getInstance('admin')

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

                $pdfModel = Settings_PDF_Record_Model::getCleanInstance($request->getByType('module_name', 2));

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

                }

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

                    ->createCommand()

    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

                    } else {

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

                    $pdfModel->deleteConditions();

    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->saveWatermarkImage($pdfModel);

    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->setResult(['id' => $pdfModel->get('pdfid')]);

    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

         * @throws \App\Exceptions\AppException

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

            $targetFile = $targetDir . (string) $templateId;

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

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

                    $value = $request->getByType($field, \App\Purifier::HTML_TEXT_PARSER);

    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 ('module_name' === $field && $pdfModel->get('module_name') !== $value) {

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

                        $value = $pdfModel->get('watermark_image');

    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

         * @throws \App\Exceptions\IllegalValue

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

                $pdfModel = Vtiger_PDF_Model::getInstanceById($request->getInteger('record'), $request->getByType('module_name', 2));

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

            if (empty($_FILES['watermark_image_file'])) {

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

            $fileInstance = \App\Fields\File::loadFromRequest($_FILES['watermark_image_file']);

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

         *

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

                    $value = $request->get($field);

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

                if ('watermark_image' === $field) {

    Line exceeds 120 characters; contains 137 characters
    Open

                if ('body_content' === $field || 'header_content' === $field || 'footer_content' === $field || 'watermark_text' === $field) {

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

                    if ('conditions' === $field) {

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

        }

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

            $stepFields = Settings_PDF_Module_Model::getFieldsByStep($step);

    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 (\is_array($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

                    // change of main module, overwrite existing conditions

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

                    $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

            $pdfModel->set('conditions', $request->getArray('conditions', '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

         * @throws \App\Exceptions\IllegalValue

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

         * @return string image filename

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

        public function saveWatermarkImage(Vtiger_PDF_Model $pdfModel)

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

         * Process request.

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

                        $value = json_encode($value);

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

            Settings_PDF_Record_Model::transformAdvanceFilterToWorkFlowFilter($pdfModel);

    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 Vtiger_PDF_Model $pdfModel

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

         * @throws \yii\db\Exception

    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

            $targetDir = Settings_PDF_Module_Model::$uploadPath;

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

                throw new \App\Exceptions\AppException('ERR_CREATE_FILE_FAILURE');

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

            $step = $request->getByType('step', 2);

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

            if ($request->isEmpty('record', true)) {

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

            Settings_PDF_Record_Model::save($pdfModel, $step);

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

            $templateId = $pdfModel->getId();

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

            if (!$fileInstance->moveFile($targetFile)) {

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

                if ('body_content' === $field || 'header_content' === $field || 'footer_content' === $field || 'watermark_text' === $field) {

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

                        $value = implode(',', $value);

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

                    if ($pdfModel->get('watermark_image')) {

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

                }

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

                $pdfModel->set($field, $value);

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

        }

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

    class Settings_PDF_Save_Action extends Settings_Vtiger_Index_Action

    There are no issues that match your filters.

    Category
    Status