Showing 148 of 159 total issues
Function getallheaders
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getallheaders()
{
if (function_exists('getallheaders')) {
$return = getallheaders();
} else {
- 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 _addNamespaces
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _addNamespaces($names, array $namespaces, array &$logs = array())
{
if (!is_array($names)) {
$names = array($names);
}
- 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 write
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function write($content = '')
{
if ($this->rotate()) {
if (empty($this->file_mtime) && file_exists($this->file_path)) {
$this->file_mtime = filemtime($this->file_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 getNewId
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getNewId($reference = null, $base_id = null)
{
if (empty($reference)) {
$reference = uniqid();
}
- 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 send
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function send($cookie_name = null, $cookie_value = null)
{
if (!empty($cookie_name)) {
$this->setName($cookie_name);
}
- 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 getLuhnKey
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getLuhnKey($val = null)
{
if (is_null($val)) {
return null;
}
- 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 findPropertyNameStatic
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function findPropertyNameStatic($name, $object)
{
$property = null;
if (property_exists($object, $name)) {
$property = $name;
- 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 create
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function create(
$url = null, $flag = self::NO_REWRITE,
$protocol = 'http', $method = 'get', array $headers = null,
array $arguments = null, array $data = null,
array $session = null, array $files = null, array $cookies = null
- 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 write
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function write($file_path = null, $content, $type = 'a', $force = false, array &$logs = array())
{
if (is_null($file_path)) {
return null;
}
- 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
Consider simplifying this complex logical expression. Open
if (
!is_object($callback) && !is_callable($callback) && !(
is_array($callback) &&
count($callback)==2 &&
is_object($callback[0]) &&
Method getArgument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getArgument($param = null, $default = false, $clean = true, $clean_flags = ENT_COMPAT, $clean_encoding = 'UTF-8')
Method getData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getData($param = null, $default = false, $clean = true, $clean_flags = ENT_COMPAT, $clean_encoding = 'UTF-8')
Method renderMulti
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function renderMulti($content, $tag_type = 'default', array $multi = array(), $args = null, $placeholder_mask = '@%s@')
Method write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function write($file_path = null, $content, $type = 'a', $force = false, array &$logs = array())
Method _setPartColumn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function _setPartColumn(array $contents, $column_index, $default, $part, $action = 'replace')
Method _setPartCell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function _setPartCell($content, $line_index, $cell_index, $part, $action = 'replace')
Method chmod
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$path = null, $mode = self::DEFAULT_UNIX_CHMOD_DIRECTORIES,
$recursive = true, $file_mode = self::DEFAULT_UNIX_CHMOD_FILES, array &$logs = array()
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array $body = array(), array $header = array(), array $footer = array(),
$title = null, $pad_flag = self::PAD_BY_EMPTY_CELLS
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function init(array $user_options=array(), $logname = null)
{
$this->logname = $logname;
if (true===self::$isInited) return;
foreach (self::$config as $_static=>$_value) {
- 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 isCached
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isCached($command, $cwd = null)
{
foreach ($this->cache as $i=>$cache) {
if ($cache['command']===$command) {
if (is_null($cwd)) {
- 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"