Showing 14 of 14 total issues
Function start
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function start($prompt, $historyFile)
{
readline_read_history($historyFile);
declare (ticks = 1);
- Read upRead up
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 start
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function start()
{
$__scope = $this->_runHooks($this->_startHooks);
extract($__scope);
- Read upRead up
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 statements
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function statements($buffer)
{
$result = $this->_createResult($buffer);
while (strlen($result->buffer) > 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method start
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function start()
{
$__scope = $this->_runHooks($this->_startHooks);
extract($__scope);
Method start
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function start($prompt, $historyFile)
{
readline_read_history($historyFile);
declare (ticks = 1);
Method version
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function version($newVersion)
{
$token = get_token();
$user = get_user();
$repo = get_repo();
Method statements
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function statements($buffer)
{
$result = $this->_createResult($buffer);
while (strlen($result->buffer) > 0) {
Method _buildAst
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _buildAst($type, $value, $seen = array())
{
// FIXME: Improve this AST so it doesn't require access to dump() or colorize()
if ($this->_isSeen($value, $seen)) {
return $this->_colorize('default', '*** RECURSION ***');
Method start
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function start()
{
declare (ticks = 1);
pcntl_signal(SIGINT, SIG_IGN, true);
Function start
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function start()
{
declare (ticks = 1);
pcntl_signal(SIGINT, SIG_IGN, true);
- Read upRead up
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 apply
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function apply(Boris $boris)
{
$applied = false;
foreach ($this->_searchPaths as $path) {
- Read upRead up
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 _read
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function _read($socket)
{
$read = array(
$socket
);
- Read upRead up
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 _scanChar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function _scanChar($result)
{
$chr = substr($result->buffer, 0, 1);
$result->stmt .= $chr;
$result->buffer = substr($result->buffer, 1);
- Read upRead up
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 _scanWsp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function _scanWsp($result)
{
if (preg_match('/^\s+/', $result->buffer, $match)) {
if (!empty($result->statements) && $result->stmt === '') {
$result->statements[] = array_pop($result->statements) . $match[0];
- Read upRead up
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"