src/cli/Repl.php

Summary

Maintainability
D
1 day
Test Coverage

File Repl.php has 423 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Quack Compiler and toolkit
 * Copyright (C) 2015-2017 Quack and CONTRIBUTORS
 *
Severity: Minor
Found in src/cli/Repl.php - About 6 hrs to fix

    Repl has 32 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Repl extends Component
    {
        private $console;
        private $croak;
        private $modules = [];
    Severity: Minor
    Found in src/cli/Repl.php - About 4 hrs to fix

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

      class Repl extends Component
      {
          private $console;
          private $croak;
          private $modules = [];
      Severity: Minor
      Found in src/cli/Repl.php by phpmd

      The class Repl has 31 non-getter- and setter-methods. Consider refactoring Repl to keep number of methods under 25.
      Open

      class Repl extends Component
      {
          private $console;
          private $croak;
          private $modules = [];
      Severity: Minor
      Found in src/cli/Repl.php by phpmd

      TooManyMethods

      Since: 0.1

      A class with too many 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'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

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

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

          private function compile($source, $silent = false)
          {
              if ('' === $source) {
                  $this->resetState();
                  return;
      Severity: Minor
      Found in src/cli/Repl.php - About 1 hr to fix

        Method handleListDefinitions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function handleListDefinitions()
            {
                $renderer = new CliColorizer();
                $context = $this->state('scope')->child;
        
        
        Severity: Minor
        Found in src/cli/Repl.php - About 1 hr to fix

          Method render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function render()
              {
                  $line = implode('', $this->state('line'));
                  $column = $this->state('column');
          
          
          Severity: Minor
          Found in src/cli/Repl.php - About 1 hr to fix

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

                private function compile($source, $silent = false)
                {
                    if ('' === $source) {
                        $this->resetState();
                        return;
            Severity: Minor
            Found in src/cli/Repl.php - About 55 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

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

                private function handleListDefinitions()
                {
                    $renderer = new CliColorizer();
                    $context = $this->state('scope')->child;
            
            
            Severity: Minor
            Found in src/cli/Repl.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

            Remove error control operator '@' on line 165.
            Open

                private function handleDownArrow()
                {
                    list ($history, $index) = $this->state('history', 'history_index');
                    $line = @$history[count($history) - ($index - 1)];
                    if (null !== $line) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            ErrorControlOperator

            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

            Example

            function foo($filePath) {
                $file = @fopen($filPath); // hides exceptions
                $key = @$array[$notExistingKey]; // assigns null to $key
            }

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

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

                private function compile($source, $silent = false)
            Severity: Minor
            Found in src/cli/Repl.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

            Remove error control operator '@' on line 152.
            Open

                private function handleUpArrow()
                {
                    list ($history, $index) = $this->state('history', 'history_index');
                    $line = @$history[count($history) - ($index + 1)];
                    if (null !== $line) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            ErrorControlOperator

            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

            Example

            function foo($filePath) {
                $file = @fopen($filPath); // hides exceptions
                $key = @$array[$notExistingKey]; // assigns null to $key
            }

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

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

                    } else {
                        $this->console->setColor(Console::FG_RED);
                        $this->console->writeln("I don't know what `$variable' is. Sorry!");
                        $this->console->resetColor();
                    }
            Severity: Minor
            Found in src/cli/Repl.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 '\QuackCompiler\Intl\Localization' in method 'intercept'.
            Open

                    $this->console->writeln(Localization::message('QUA010', [$command]));
            Severity: Minor
            Found in src/cli/Repl.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 start uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                        } else {
                            $this->compile($line);
                        }
            Severity: Minor
            Found in src/cli/Repl.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 '\QuackCompiler\Intl\Localization' in method 'intercept'.
            Open

                    $this->console->writeln(Localization::message('QUA020', []));
            Severity: Minor
            Found in src/cli/Repl.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 compile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                        } else {
                            if (!$silent) {
                                $this->console->write($parser->beautify());
                            }
                            $this->state('ast')->attachValidAST($parser->ast);
            Severity: Minor
            Found in src/cli/Repl.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 unused private methods such as 'handleCtrlRightArrow'.
            Open

                private function handleCtrlRightArrow()
                {
                    $boundaries = $this->getBoundaries();
                    list ($line, $column) = $this->state('line', 'column');
                    $next_boundary = reset(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleUpArrow'.
            Open

                private function handleUpArrow()
                {
                    list ($history, $index) = $this->state('history', 'history_index');
                    $line = @$history[count($history) - ($index + 1)];
                    if (null !== $line) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleDownArrow'.
            Open

                private function handleDownArrow()
                {
                    list ($history, $index) = $this->state('history', 'history_index');
                    $line = @$history[count($history) - ($index - 1)];
                    if (null !== $line) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleListDefinitionsKey'.
            Open

                private function handleListDefinitionsKey()
                {
                    $context = $this->state('scope')->child;
            
                    if (0 !== sizeof($context->table)) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleLeftArrow'.
            Open

                private function handleLeftArrow()
                {
                    $column = $this->state('column');
                    $this->setState(['column' => max(0, $column - 1)]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleDelete'.
            Open

                private function handleDelete()
                {
                    list ($line, $column) = $this->state('line', 'column');
                    if ($column === count($line)) {
                        return;
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleCtrlA'.
            Open

                private function handleCtrlA()
                {
                    $this->setState(['column' => 0]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleInsert'.
            Open

                private function handleInsert()
                {
                    $insert = $this->state('insert');
                    $this->setState(['insert' => !$insert]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleHome'.
            Open

                private function handleHome()
                {
                    $this->setState(['column' => 0]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleBackspace'.
            Open

                private function handleBackspace()
                {
                    list ($line, $column) = $this->state('line', 'column');
            
                    if (0 === $column) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleCtrlLeftArrow'.
            Open

                private function handleCtrlLeftArrow()
                {
                    $boundaries = $this->getBoundaries();
                    $column = $this->state('column');
                    $previous_boundary = end(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            The method handleQuit() contains an exit expression.
            Open

                    exit;
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            ExitExpression

            Since: 0.2

            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

            Example

            class Foo {
                public function bar($param)  {
                    if ($param === 42) {
                        exit(23);
                    }
                }
            }

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

            Avoid unused private methods such as 'handleEnd'.
            Open

                private function handleEnd()
                {
                    $this->setState(['column' => count($this->state('line'))]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            Avoid unused private methods such as 'handleRightArrow'.
            Open

                private function handleRightArrow()
                {
                    list ($line, $column) = $this->state('line', 'column');
                    $this->setState(['column' => min(count($line), $column + 1)]);
                }
            Severity: Minor
            Found in src/cli/Repl.php by phpmd

            UnusedPrivateMethod

            Since: 0.2

            Unused Private Method detects when a private method is declared but is unused.

            Example

            class Something
            {
                private function foo() {} // unused
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

            TODO found
            Open

                    // TODO: We can give color after embedding the tokenizer here
            Severity: Minor
            Found in src/cli/Repl.php by fixme

            The variable $previous_boundary is not named in camelCase.
            Open

                private function handleCtrlLeftArrow()
                {
                    $boundaries = $this->getBoundaries();
                    $column = $this->state('column');
                    $previous_boundary = end(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $text_size is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $next_char is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $previous_boundary is not named in camelCase.
            Open

                private function handleCtrlLeftArrow()
                {
                    $boundaries = $this->getBoundaries();
                    $column = $this->state('column');
                    $previous_boundary = end(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $next_boundary is not named in camelCase.
            Open

                private function handleCtrlRightArrow()
                {
                    $boundaries = $this->getBoundaries();
                    list ($line, $column) = $this->state('line', 'column');
                    $next_boundary = reset(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $line_string is not named in camelCase.
            Open

                private function handleKeyPress($input)
                {
                    if (ctype_cntrl($input)) {
                        return;
                    }
            Severity: Minor
            Found in src/cli/Repl.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 $prompt_color is not named in camelCase.
            Open

                private function renderPrompt($color = Console::FG_YELLOW)
                {
                    $prompt = $this->state('complete') ? 'Quack> ' : '.....> ';
                    $prompt_color = $this->state('complete') ? $color : Console::FG_BOLD_GREEN;
                    $this->console->setColor($prompt_color);
            Severity: Minor
            Found in src/cli/Repl.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 $next_buffer is not named in camelCase.
            Open

                private function handleKeyPress($input)
                {
                    if (ctype_cntrl($input)) {
                        return;
                    }
            Severity: Minor
            Found in src/cli/Repl.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 $line_string is not named in camelCase.
            Open

                private function handleKeyPress($input)
                {
                    if (ctype_cntrl($input)) {
                        return;
                    }
            Severity: Minor
            Found in src/cli/Repl.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 $next_char is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $show_left_scroll is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $next_buffer is not named in camelCase.
            Open

                private function handleKeyPress($input)
                {
                    if (ctype_cntrl($input)) {
                        return;
                    }
            Severity: Minor
            Found in src/cli/Repl.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 $text_size is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $previous_boundary is not named in camelCase.
            Open

                private function handleCtrlLeftArrow()
                {
                    $boundaries = $this->getBoundaries();
                    $column = $this->state('column');
                    $previous_boundary = end(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $prompt_color is not named in camelCase.
            Open

                private function renderPrompt($color = Console::FG_YELLOW)
                {
                    $prompt = $this->state('complete') ? 'Quack> ' : '.....> ';
                    $prompt_color = $this->state('complete') ? $color : Console::FG_BOLD_GREEN;
                    $this->console->setColor($prompt_color);
            Severity: Minor
            Found in src/cli/Repl.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 $colored_line is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $text_size is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $next_boundary is not named in camelCase.
            Open

                private function handleCtrlRightArrow()
                {
                    $boundaries = $this->getBoundaries();
                    list ($line, $column) = $this->state('line', 'column');
                    $next_boundary = reset(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $next_boundary is not named in camelCase.
            Open

                private function handleCtrlRightArrow()
                {
                    $boundaries = $this->getBoundaries();
                    list ($line, $column) = $this->state('line', 'column');
                    $next_boundary = reset(array_filter($boundaries, function ($boundary) use ($column) {
            Severity: Minor
            Found in src/cli/Repl.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 $text_size is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $show_left_scroll is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $text_size is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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 $colored_line is not named in camelCase.
            Open

                public function render()
                {
                    $line = implode('', $this->state('line'));
                    $column = $this->state('column');
            
            
            Severity: Minor
            Found in src/cli/Repl.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