YetiForceCompany/YetiForceCRM

View on GitHub
app/ConfigFile.php

Summary

Maintainability
B
6 hrs
Test Coverage
B
80%

Function create has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public function create()
    {
        if (\array_diff_key($this->getData(), $this->template)) {
            throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
        }
Severity: Minor
Found in app/ConfigFile.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

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

    public function validate(string $key, $value)
    {
        if (!isset($this->template[$key])) {
            throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $key, 406);
        }
Severity: Minor
Found in app/ConfigFile.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

Method create has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function create()
    {
        if (\array_diff_key($this->getData(), $this->template)) {
            throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
        }
Severity: Minor
Found in app/ConfigFile.php - About 1 hr to fix

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

        private function loadTemplate()
        {
            if (!\file_exists($this->templatePath)) {
                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->templatePath, 406);
            }
    Severity: Minor
    Found in app/ConfigFile.php - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    The method create() has an NPath complexity of 208. The configured NPath complexity threshold is 200.
    Open

        public function create()
        {
            if (\array_diff_key($this->getData(), $this->template)) {
                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
            }
    Severity: Minor
    Found in app/ConfigFile.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 create() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
    Open

        public function create()
        {
            if (\array_diff_key($this->getData(), $this->template)) {
                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
            }
    Severity: Minor
    Found in app/ConfigFile.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 22 to the 15 allowed.
    Open

        public function create()
    Severity: Critical
    Found in app/ConfigFile.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 '231', column '15').
    Open

            $file = new \Nette\PhpGenerator\PhpFile();
    Severity: Minor
    Found in app/ConfigFile.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 'App\Config' in method 'create'.
    Open

                    $value = $this->has($parameterName) ? $this->get($parameterName) : Config::get($className, $parameterName, $parameter['default']);
    Severity: Minor
    Found in app/ConfigFile.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 getClassName uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $className .= ucfirst($this->type);
            }
    Severity: Minor
    Found in app/ConfigFile.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->templatePath = 'config' . \DIRECTORY_SEPARATOR . 'ConfigTemplates.php';
                $this->path = 'config' . \DIRECTORY_SEPARATOR . \ucfirst($this->type) . '.php';
            }
    Severity: Minor
    Found in app/ConfigFile.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 create uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                require "{$this->path}";
            }
    Severity: Minor
    Found in app/ConfigFile.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\Cache' in method 'create'.
    Open

            Cache::resetFileCache($this->path);
    Severity: Minor
    Found in app/ConfigFile.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 create uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    $value = $this->has($parameterName) ? $this->get($parameterName) : Config::get($className, $parameterName, $parameter['default']);
                    $property = $class->addProperty($parameterName, $value)->setStatic()->addComment($parameter['description']);
                }
    Severity: Minor
    Found in app/ConfigFile.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\Cache' in method 'loadTemplate'.
    Open

            Cache::resetFileCache($this->templatePath);
    Severity: Minor
    Found in app/ConfigFile.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                $this->path = 'config' . \DIRECTORY_SEPARATOR . 'Modules' . \DIRECTORY_SEPARATOR . "{$component}.php";
    Severity: Critical
    Found in app/ConfigFile.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 "sanitization" 4 times.
    Open

            if (isset($this->template[$key]['sanitization'])) {
    Severity: Critical
    Found in app/ConfigFile.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 "ERR_NOT_ALLOWED_VALUE||" 4 times.
    Open

                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $type, 406);
    Severity: Critical
    Found in app/ConfigFile.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 "validationValues" 3 times.
    Open

            if (isset($this->template[$key]['validationValues']) && \is_array($this->template[$key]['validationValues'])) {
    Severity: Critical
    Found in app/ConfigFile.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 "validation" 4 times.
    Open

                    if (true !== \call_user_func_array($this->template[$key]['validation'], [$row])) {
    Severity: Critical
    Found in app/ConfigFile.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" 4 times.
    Open

            'module',
    Severity: Critical
    Found in app/ConfigFile.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 "component" 4 times.
    Open

            'component',
    Severity: Critical
    Found in app/ConfigFile.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.

    Call to method addComment from undeclared class \Nette\PhpGenerator\PhpFile
    Open

            $file->addComment($this->license);
    Severity: Critical
    Found in app/ConfigFile.php by phan

    Call to method addClass from undeclared class \Nette\PhpGenerator\PhpFile
    Open

            $class = $file->addClass($className);
    Severity: Critical
    Found in app/ConfigFile.php by phan

    Suspicious array access to ?mixed
    Open

                    $property = $class->addProperty($parameterName, $value)->setStatic()->addComment($parameter['description']);
    Severity: Minor
    Found in app/ConfigFile.php by phan

    Suspicious array access to ?mixed
    Open

                    $value = $this->has($parameterName) ? $this->get($parameterName) : Config::get($className, $parameterName, $parameter['default']);
    Severity: Minor
    Found in app/ConfigFile.php by phan

    Call to method __construct from undeclared class \Nette\PhpGenerator\PhpFile
    Open

            $file = new \Nette\PhpGenerator\PhpFile();
    Severity: Critical
    Found in app/ConfigFile.php by phan

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->templatePath = 'modules' . \DIRECTORY_SEPARATOR . $component . \DIRECTORY_SEPARATOR . 'ConfigTemplate.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'relation',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $path;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!\in_array($type, self::TYPES)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var string|null Component name */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $component;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'performance',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var string Path to the configuration file */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string      $type
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string|null $component
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string|null $key
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $value = \call_user_func_array($this->template[$key]['sanitization'], [$value]);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            return $value;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $class->addComment("Configuration file: $className.");
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $type;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $license = 'Configuration file.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 128 characters
    Open

                $this->templatePath = 'config' . \DIRECTORY_SEPARATOR . 'Components' . \DIRECTORY_SEPARATOR . 'ConfigTemplates.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Load configuration template.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @return mixed
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            return $key ? ($this->template[$key] ?? null) : $this->template;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Function for data validation.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            return true === \call_user_func_array($this->template[$key]['validation'], [$value]);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string $key
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Create configuration file.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (\array_diff_key($this->getData(), $this->template)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    $value = $this->has($parameterName) ? $this->get($parameterName) : Config::get($className, $parameterName, $parameter['default']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

                    $property = $class->addProperty($parameterName, $value)->setStatic()->addComment($parameter['description']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'component',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var string License */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->path = 'config' . \DIRECTORY_SEPARATOR . 'Modules' . \DIRECTORY_SEPARATOR . "{$component}.php";
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $className .= 'Modules\\' . $this->component;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $className .= ucfirst($this->type);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                return \in_array($value, $this->template[$key]['validationValues']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $status = true;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 143 characters
    Open

                    throw new Exceptions\AppException("ERR_CONTENTS_VARIABLE_CANT_CALLED_FUNCTION ||{$this->template[$key]['sanitization']}", 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'debug',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var array Template data */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $this->type = $type;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 126 characters
    Open

                $this->templatePath = 'modules' . \DIRECTORY_SEPARATOR . $component . \DIRECTORY_SEPARATOR . 'ConfigTemplate.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                if (!isset($data[$this->type])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->type, 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $this->template = $data;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private function getClassName()
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $key, 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (isset($this->template[$key]['validationValues']) && \is_array($this->template[$key]['validationValues'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    if (true !== \call_user_func_array($this->template[$key]['validation'], [$row])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                        $property->addComment("@{$tagName} {$val}");
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var string Path to the configuration template file */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $this->loadTemplate();
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            return $className;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function validate(string $key, $value)
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @return self
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 146 characters
    Open

                    $value = $this->has($parameterName) ? $this->get($parameterName) : Config::get($className, $parameterName, $parameter['default']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'api',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'developer',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function __construct(string $type, ?string $component = '')
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            parent::__construct();
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if ($component) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $data = $data[$this->type];
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @return mixed
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function sanitize(string $key, $value)
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function create()
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    foreach ($parameter['docTags'] as $tagName => $val) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                        $property->addComment('');
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    if (isset($className::${$name})) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** Types of configuration files */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'module',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'sounds',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        ];
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } elseif ('component' === $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->templatePath = 'config' . \DIRECTORY_SEPARATOR . 'ConfigTemplates.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->path = 'config' . \DIRECTORY_SEPARATOR . \ucfirst($this->type) . '.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$this->type}:{$this->component}", 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!empty($this->template[$key]['loopValidate'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                return $status;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function set($key, $value)
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                        $className::${$name} = $property->getValue();
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->path = 'config' . \DIRECTORY_SEPARATOR . 'Components' . \DIRECTORY_SEPARATOR . "{$component}.php";
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Gets class name.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if ('module' === $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!isset($this->template[$key])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Function for data sanitize.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            foreach ($this->template as $parameterName => $parameter) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public const TYPES = [
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private function loadTemplate()
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $data = $data[$this->component];
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                foreach ($value as $row) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param mixed  $value
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                require "{$this->path}";
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * ConfigFile constructor.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $type, 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->component = $component;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $data = require "{$this->templatePath}";
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                if (!isset($data[$this->component])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string $key
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $file->addComment($this->license);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            Cache::resetFileCache($this->path);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'db',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'security',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if ('module' === $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } elseif ('module' !== $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!isset($this->template[$key]['validation']) || !\is_callable($this->template[$key]['validation'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    throw new Exceptions\AppException("ERR_CONTENTS_VARIABLE_CANT_CALLED_FUNCTION ||{$this->template[$key]['sanitization']}", 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\IllegalValue("ERR_NOT_ALLOWED_VALUE||{$key}||" . \var_export($value, true), 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\IllegalValue
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    Line exceeds 120 characters; contains 146 characters
    Open

                    $property = $class->addMethod($parameterName)->setStatic()->setBody($parameter['default'])->addComment($parameter['description']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'main',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'layout',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $template = [];
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $this->templatePath = 'config' . \DIRECTORY_SEPARATOR . 'Components' . \DIRECTORY_SEPARATOR . 'ConfigTemplates.php';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                        break;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (isset($this->template[$key]['sanitization'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param mixed  $value
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    $property = $class->addMethod($parameterName)->setStatic()->setBody($parameter['default'])->addComment($parameter['description']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                if (isset($parameter['docTags'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'securityKeys',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            'search',
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /** @var string Type of configuration file */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        private $templatePath;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->templatePath, 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                $className .= 'Components\\' . $this->component;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * Gets template data.
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            return parent::set($key, $this->sanitize($key, $value));
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE', 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $file = new \Nette\PhpGenerator\PhpFile();
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                if (isset($parameter['type']) && 'function' === $parameter['type']) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            } elseif ('component' === $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param mixed  $value
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @return bool
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                        $status = false;
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @throws \App\Exceptions\AppException
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                if (!\is_callable($this->template[$key]['sanitization'])) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $className = $this->getClassName();
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                } else {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\AppException("ERR_CREATE_FILE_FAILURE||{$this->path}");
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!\file_exists($this->templatePath)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            Cache::resetFileCache($this->templatePath);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if ('component' === $this->type) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $className = 'Config\\';
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        public function getTemplate(?string $key = null)
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (!$this->validate($key, $value)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            $class = $file->addClass($className);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                    $property = $class->addProperty($parameterName, $value)->setStatic()->addComment($parameter['description']);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                foreach ($class->getProperties() as $name => $property) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         * @param string $key
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                throw new Exceptions\AppException("ERR_CONTENTS_VARIABLE_CANT_CALLED_FUNCTION||{$key}", 406);
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (\class_exists($className)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            if (false === file_put_contents($this->path, $file, LOCK_EX)) {
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in app/ConfigFile.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status