Showing 148 of 159 total issues
Function _setPartCell
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function _setPartCell($content, $line_index, $cell_index, $part, $action = 'replace')
{
if (property_exists($this, $part)) {
if (is_null($line_index)) {
end($this->{$part});
- 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 getTableIterator
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTableIterator($part = 'body', $iterator_flag = self::ITERATE_ON_LINES)
{
$this->_repadAllLines();
$table = $this->getTable();
unset($table['title']);
Function copy
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function copy($file_path = null, $target_path = null, $force = false, array &$logs = array())
{
if (is_null($file_path) || is_null($target_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
Function load
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function load($class_name = null)
{
if (empty(self::$__registry) && empty(self::$__configurator) && empty($class_name)) {
$class_name = self::getInternal('config-class');
if (empty($class_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 url
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function url($param = null, $value = null, $url = null)
{
if (is_null($param)) {
return '';
}
- 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 intToRoman
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function intToRoman($a = null)
{
if (is_null($a)) {
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
Method _treatOptions
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _treatOptions()
{
$this->params = self::getopt();
$this->debugWrite( ">> Command line arguments are [".var_export($this->params,1)."]" );
Method formatHelpString
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function formatHelpString($title = null, $contents = null, Formater $formater)
{
if (empty($contents)) return '';
if (empty($title)) $title = 'Help';
if (!is_array($contents)) $contents = array( $contents );
Function rotate
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function rotate($force = false)
{
$rotator = $this->options['backup_time'];
if (true===$force || $this->mustRotate()) {
- 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 buildUrl
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function buildUrl()
{
$url = UrlHelper::parse($this->getUrl());
$get = $this->getArguments();
- 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 __extractDocString
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function __extractDocString($DocComment, $lines = null, $parse_tags = false)
{
$split = preg_split("/\r\n|\n|\r/", $DocComment);
//clean up: removes useless chars like new-lines, tabs and *
- 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 getParameter
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function getParameter($param = false, $url = false)
{
if (empty($param)) {
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 _getArgsStackForTable
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function _getArgsStackForTable(array &$args, $entry, $scope)
{
$found_args = array();
$global_args = $this->_getArgsStack($args, $entry, array(), false);
if (!empty($global_args)) {
- 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 namespaceExists
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function namespaceExists($namespace)
{
$namespace = trim($namespace, self::NAMESPACE_SEPARATOR);
$namespace .= self::NAMESPACE_SEPARATOR;
Method parse
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function parse($node)
{
$output = array();
switch ($node->nodeType) {
case XML_CDATA_SECTION_NODE:
Function _classesImplements
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _classesImplements($names, array $interfaces, $must_implement_all = false, 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 _extractSegments
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _extractSegments(&$arguments)
{
if (is_string($arguments)) $this->_extractArguments($arguments);
foreach ($arguments as $var=>$val) {
if (empty($val) && strpos($var, '/')!==false) {
- 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 _setPartColumn
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _setPartColumn(array $contents, $column_index, $default, $part, $action = 'replace')
{
if (property_exists($this, $part)) {
if (is_null($column_index) || $column_index>$this->getColumnSize()) {
$column_index = $this->getColumnSize();
- 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 format
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function format($text = null, $foreground = null, $background = null, $option = null)
{
$codes = array();
if (!empty($foreground)) {
- 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 dumpClosure
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function dumpClosure(\Closure $c)
{
$str = 'function (';
$r = new \ReflectionFunction($c);
$params = array();
- 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"