src/Flow/Flow.php

Summary

Maintainability
D
2 days
Test Coverage

Function buildWithoutCache has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

    public function buildWithoutCache(array $data): string
    {
        $code     = [];
        $lastLast = null;
        $last     = null;
Severity: Minor
Found in src/Flow/Flow.php - About 6 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

File Flow.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Bavix\Flow;

use Bavix\Exceptions\Invalid;
Severity: Minor
Found in src/Flow/Flow.php - About 5 hrs to fix

    The class Flow has 12 public methods. Consider refactoring Flow to keep number of public methods under 10.
    Open

    class Flow
    {
    
        const VERSION = '1.0.6';
    
    
    Severity: Minor
    Found in src/Flow/Flow.php by phpmd

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

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

    The class Flow has an overall complexity of 79 which is very high. The configured complexity threshold is 50.
    Open

    class Flow
    {
    
        const VERSION = '1.0.6';
    
    
    Severity: Minor
    Found in src/Flow/Flow.php by phpmd

    Method buildWithoutCache has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function buildWithoutCache(array $data): string
        {
            $code     = [];
            $lastLast = null;
            $last     = null;
    Severity: Major
    Found in src/Flow/Flow.php - About 3 hrs to fix

      Flow has 25 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Flow
      {
      
          const VERSION = '1.0.6';
      
      
      Severity: Minor
      Found in src/Flow/Flow.php - About 2 hrs to fix

        The class Flow has 19 fields. Consider redesigning Flow to keep the number of fields under 15.
        Open

        class Flow
        {
        
            const VERSION = '1.0.6';
        
        
        Severity: Minor
        Found in src/Flow/Flow.php by phpmd

        TooManyFields

        Since: 0.1

        Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

        Example

        class Person {
           protected $one;
           private $two;
           private $three;
           [... many more fields ...]
        }

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

        Method compile has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function compile(string $view): string
            {
                $path      = $this->native()->path($view . $this->ext());
                $this->tpl = \file_get_contents($path);
                $tokens    = $this->lexer()->tokens($this->tpl);
        Severity: Minor
        Found in src/Flow/Flow.php - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if ($last && (!$lastLast ||
                              ($lastLast->type !== T_VARIABLE &&
                                  $lastLast->type !== Validator::T_ENDBRACKET &&
                                  $lastLast->type !== Validator::T_ENDARRAY))
                          && $last->type === Validator::T_DOT)
          Severity: Major
          Found in src/Flow/Flow.php - About 40 mins to fix

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

                public function compile(string $view): string
                {
                    $path      = $this->native()->path($view . $this->ext());
                    $this->tpl = \file_get_contents($path);
                    $tokens    = $this->lexer()->tokens($this->tpl);
            Severity: Minor
            Found in src/Flow/Flow.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 buildWithoutCache() has an NPath complexity of 58801. The configured NPath complexity threshold is 200.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.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 buildWithoutCache() has 105 lines of code. Current threshold is set to 100. Avoid really long methods.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

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

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.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 43 to the 15 allowed.
            Open

                public function buildWithoutCache(array $data): string
            Severity: Critical
            Found in src/Flow/Flow.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

            Class "Flow" has 25 methods, which is greater than 20 authorized. Split it into smaller classes.
            Open

            class Flow
            Severity: Major
            Found in src/Flow/Flow.php by sonar-php

            A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

            The class Flow has a coupling between objects value of 22. Consider to reduce the number of dependencies under 13.
            Open

            class Flow
            {
            
                const VERSION = '1.0.6';
            
            
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CouplingBetweenObjects

            Since: 1.1.0

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

            Example

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

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

            The method printers has a boolean flag argument $escape, which is a certain sign of a Single Responsibility Principle violation.
            Open

                protected function printers(array $rows, $escape = true)
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

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

            Avoid using static access to class 'Bavix\Flow\Property' in method '__construct'.
            Open

                    $this->constructs = Property::get('constructs');
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'fragment'.
            Open

                    $data = Arr::map($tokens['tokens'] ?? $tokens, function (Token $token) {
                        return $token->token;
                    });
            Severity: Minor
            Found in src/Flow/Flow.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 'Bavix\Flow\Cache' in method '__construct'.
            Open

                    Cache::setPool($options['cache'] ?? null);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                                Arr::pop($code);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                                (!$last || !Arr::in([
                                        Validator::T_ENDBRACKET,
                                        Validator::T_ENDARRAY,
                                        Validator::T_DOT,
                                        T_NS_SEPARATOR,
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'compile'.
            Open

                                        \get_class(Arr::pop($items))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            Arr::push($code, $pop);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Str' in method 'buildWithoutCache'.
            Open

                            if (Str::ucFirst($_token->token) === $_token->token)
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Str' in method 'ifEnd'.
            Open

                    if (0 === Str::pos($key, 'end'))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Minify_HTML' in method 'minify'.
            Open

                        $html = \Minify_HTML::minify(\trim($html), [
                            'cssMinifier' => [\Minify_CSSmin::class, 'minify'],
                            'jsMinifier'  => [JSMin::class, 'minify'],
                        ]);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'popDirective'.
            Open

                    return Arr::pop($this->directives[$key]);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                        if (Arr::in([T_NEW, T_CLONE, T_INSTEADOF, T_INSTANCEOF, T_AS], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                                Arr::pop($code);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                                Arr::push($code, '->');
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Str' in method 'buildWithoutCache'.
            Open

                            if (Str::ucFirst($_token->token) !== $_token->token &&
            Severity: Minor
            Found in src/Flow/Flow.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 'Bavix\Flow\Cache' in method 'build'.
            Open

                    return Cache::get($_storeKey, function () use ($self, &$data) {
                        return $self->buildWithoutCache($data);
                    });
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            $pop = Arr::pop($code);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            Arr::push($code, '\\' . WithDirective::class . '::last()');
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            ($last && !Arr::in([\T_DOUBLE_COLON, Validator::T_DOT], $last->type))) &&
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\JSON' in method 'build'.
            Open

                    $_storeKey = __CLASS__ . JSON::encode($data);
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                                !Arr::in($this->constructs, $_token->token))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            if (!Arr::in([T_FUNCTION, T_CLASS], $_token->type) &&
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                            if (!Arr::in([T_NEW, T_CLASS], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                        if (Arr::in([Validator::T_BRACKET, T_ARRAY], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Str' in method 'directive'.
            Open

                    $class = __NAMESPACE__ . '\\Directives\\' . Str::ucFirst($key) . 'Directive';
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Arr' in method 'buildWithoutCache'.
            Open

                        if (Arr::in([T_VARIABLE, T_FUNCTION], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.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 '\Bavix\Helpers\Str' in method 'ifEnd'.
            Open

                        $key  = Str::sub($key, 3);
            Severity: Minor
            Found in src/Flow/Flow.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

            Merge this if statement with the enclosing one.
            Open

                            if ($last && $last->type === Validator::T_DOT)
            Severity: Major
            Found in src/Flow/Flow.php by sonar-php

            Merging collapsible if statements increases the code's readability.

            Noncompliant Code Example

            if (condition1) {
              if (condition2) {
                ...
              }
            }
            

            Compliant Solution

            if (condition1 && condition2) {
              ...
            }
            

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

                    $this->minify        = $options['minify'] ?? false;
            Severity: Critical
            Found in src/Flow/Flow.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.

            Merge this if statement with the enclosing one.
            Open

                            if (!empty($items))
            Severity: Major
            Found in src/Flow/Flow.php by sonar-php

            Merging collapsible if statements increases the code's readability.

            Noncompliant Code Example

            if (condition1) {
              if (condition2) {
                ...
              }
            }
            

            Compliant Solution

            if (condition1 && condition2) {
              ...
            }
            

            Merge this if statement with the enclosing one.
            Open

                            if (Str::ucFirst($_token->token) !== $_token->token &&
            Severity: Major
            Found in src/Flow/Flow.php by sonar-php

            Merging collapsible if statements increases the code's readability.

            Noncompliant Code Example

            if (condition1) {
              if (condition2) {
                ...
              }
            }
            

            Compliant Solution

            if (condition1 && condition2) {
              ...
            }
            

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

                    $data = Arr::map($tokens['tokens'] ?? $tokens, function (Token $token) {
            Severity: Critical
            Found in src/Flow/Flow.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.

            The closing brace for the class must go on the next line after the body
            Open

            }
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$this->lexer)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        foreach ($this->folders as $folder => $path)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                            if ($last && $last->type === Validator::T_DOT)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!empty($this->extends))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$this->fileSystem()->has($view))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($this->directives as $name => $items)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($rows as $row)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$this->lexeme)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$this->native)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if ($this->lexeme()->closed($name))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                            if (!empty($items))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if (Arr::in([Validator::T_BRACKET, T_ARRAY], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($this->lexemes as $folder)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if ($native)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                            $_token->type === T_FUNCTION)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                            if (Str::ucFirst($_token->token) === $_token->token)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if ($_token->type === T_OBJECT_OPERATOR)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                                !Arr::in($this->constructs, $_token->token))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($data['tokens'] as $token)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                            if ($last && $last->type === Validator::T_DOT)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if (true !== $data && $this->lexeme()->closed($key))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if (Arr::in([T_NEW, T_CLONE, T_INSTEADOF, T_INSTANCEOF, T_AS], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$tpl)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                                    ], $last->type)))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if ($end && true !== $data)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if ($_token->type === Validator::T_CONCAT)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                            && $last->type === Validator::T_DOT)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (!$this->fileSystem)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 17
            Open

                            if (!Arr::in([T_NEW, T_CLASS], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 13
            Open

                        if (Arr::in([T_VARIABLE, T_FUNCTION], $_token->type))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($this->operators as $operator)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (isset($this->mapDirectives[$key]))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (0 === Str::pos($key, 'end'))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    foreach ($this->literals as $key => $literal)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if ($this->minify)
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            Expected 1 space after closing parenthesis; found 9
            Open

                    if (empty($this->directives[$key]))
            Severity: Minor
            Found in src/Flow/Flow.php by phpcodesniffer

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_storeKey is not named in camelCase.
            Open

                public function build(array $data): string
                {
                    $self      = $this;
                    $_storeKey = __CLASS__ . JSON::encode($data);
            
            
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_storeKey is not named in camelCase.
            Open

                public function build(array $data): string
                {
                    $self      = $this;
                    $_storeKey = __CLASS__ . JSON::encode($data);
            
            
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                protected function operators()
                {
                    foreach ($this->operators as $operator)
                    {
                        /**
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            The variable $_token is not named in camelCase.
            Open

                public function buildWithoutCache(array $data): string
                {
                    $code     = [];
                    $lastLast = null;
                    $last     = null;
            Severity: Minor
            Found in src/Flow/Flow.php by phpmd

            CamelCaseVariableName

            Since: 0.2

            It is considered best practice to use the camelCase notation to name variables.

            Example

            class ClassName {
                public function doSomething() {
                    $data_module = new DataModule();
                }
            }

            Source

            There are no issues that match your filters.

            Category
            Status