kahlan/kahlan

View on GitHub

Showing 191 of 191 total issues

Avoid too many return statements within this method.
Open

                return 'E_DEPRECATED';
Severity: Major
Found in src/Analysis/Debugger.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return 'E_STRICT';
    Severity: Major
    Found in src/Analysis/Debugger.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return '<INVALID>';
      Severity: Major
      Found in src/Analysis/Debugger.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return 'E_CORE_WARNING';
        Severity: Major
        Found in src/Analysis/Debugger.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return 'E_USER_ERROR';
          Severity: Major
          Found in src/Analysis/Debugger.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return 'E_USER_DEPRECATED';
            Severity: Major
            Found in src/Analysis/Debugger.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return 'E_CORE_ERROR';
              Severity: Major
              Found in src/Analysis/Debugger.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return 'E_USER_NOTICE';
                Severity: Major
                Found in src/Analysis/Debugger.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return 'E_COMPILE_ERROR';
                  Severity: Major
                  Found in src/Analysis/Debugger.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return 'E_COMPILE_WARNING';
                    Severity: Major
                    Found in src/Analysis/Debugger.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return 'E_RECOVERABLE_ERROR';
                      Severity: Major
                      Found in src/Analysis/Debugger.php - About 30 mins to fix

                        Function patch has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function patch($source, $dest = null)
                            {
                                $source = ltrim($source, '\\');
                                if (is_object($source) || class_exists($source)) {
                                    $reference = $source;
                        Severity: Minor
                        Found in src/Plugin/Monkey.php - About 25 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 _execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function _execute()
                            {
                                if (!$this->enabled() && !$this->focused()) {
                                    return;
                                }
                        Severity: Minor
                        Found in src/Block/Group.php - About 25 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 generate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static function generate($options = [])
                            {
                                $defaults = [
                                    'class'      => 'Kahlan\Spec\Plugin\Double\Double' . static::$_index++,
                                    'extends'    => '',
                        Severity: Minor
                        Found in src/Plugin/Double.php - About 25 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 broadcastFocus has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function broadcastFocus()
                            {
                                foreach ($this->_children as $child) {
                                    if ($child->type() !== 'normal') {
                                        continue;
                        Severity: Minor
                        Found in src/Block/Group.php - About 25 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 match has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function match($call, $withArgs = true)
                            {
                                if (preg_match('/^::.*/', $call['name'])) {
                                    $call['static'] = true;
                                    $call['name'] = substr($call['name'], 2);
                        Severity: Minor
                        Found in src/Plugin/Call/Message.php - About 25 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 _processNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function _processNode($file, $node, $coverage, $path)
                            {
                                if ($node->type === 'namespace') {
                                    $path = "{$path}" . $node->name . '\\';
                                    $this->_processTree($file, $node->tree, $coverage, $path);
                        Severity: Minor
                        Found in src/Reporter/Coverage/Collector.php - About 25 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 _functionNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function _functionNode()
                            {
                                $node = new FunctionDef();
                                $token = $this->_stream->current(true);
                                $parent = $this->_states['current'];
                        Severity: Minor
                        Found in src/Jit/Parser.php - About 25 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 _process has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected function _process($options = [])
                            {
                                $suite = $this->suite();
                                if ($suite->root()->focused() && !$this->focused()) {
                                    return;
                        Severity: Minor
                        Found in src/Block.php - About 25 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 _generateInterfaceMethods has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            protected static function _generateInterfaceMethods($interfaces, $mask = 255)
                            {
                                if (!$interfaces) {
                                    return [];
                                }
                        Severity: Minor
                        Found in src/Plugin/Double.php - About 25 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

                        Severity
                        Category
                        Status
                        Source
                        Language