File Xmlrpcs.php
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Function _execute
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
protected function _execute($m)
{
$methName = $m->method_name;
// Check to see if it is a system call
- 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 _execute
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _execute($m)
{
$methName = $m->method_name;
// Check to see if it is a system call
Method parseRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseRequest($data = '')
{
//-------------------------------------
// Get Data
//-------------------------------------
Function parseRequest
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function parseRequest($data = '')
{
//-------------------------------------
// Get Data
//-------------------------------------
- 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 do_multicall
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function do_multicall($call)
{
if ($call->kindOf() !== 'struct')
{
return $this->multicall_error('notstruct');
Function methodSignature
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function methodSignature($m)
{
$parameters = $m->output_parameters();
$method_name = $parameters[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
Function do_multicall
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function do_multicall($call)
{
if ($call->kindOf() !== 'struct')
{
return $this->multicall_error('notstruct');
- 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
Avoid deeply nested control flow statements. Open
if ($pt !== $current_sig[$n+1])
{
$pno = $n+1;
$wanted = $current_sig[$n+1];
Avoid too many return
statements within this method. Open
return get_instance()->{$method_parts[1]}($m);
Avoid too many return
statements within this method. Open
return $this->multicall_error('notarray');
Avoid too many return
statements within this method. Open
return $this->multicall_error($result);
Avoid too many return
statements within this method. Open
return $this->object->{$method_parts[1]}($m);
Avoid too many return
statements within this method. Open
return call_user_func($this->methods[$methName]['function'], $m);
Avoid too many return
statements within this method. Open
return new XML_RPC_Values(array($result->value()), 'array');
Avoid too many return
statements within this method. Open
return $this->multicall_error('noparams');
Avoid too many return
statements within this method. Open
return call_user_func(array($this, $method_parts[1]), $m);