Showing 159 of 159 total issues
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 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
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
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 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 _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 _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 _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 interpolate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function interpolate($message, array $context = array(), $silent = false)
{
$replace = array();
foreach ($context as $key => $val) {
if ($key==='exception' && ($val instanceof \Exception)) {
- 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 unsetService
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function unsetService($name)
{
if ($this->hasService($name)) {
if (!$this->isProtected($name)) {
if ($this->hasProvider($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 __call
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function __call($name, array $arguments)
{
$return = null;
// unset, isset, reset
- 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"
Further reading
Function __call
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function __call($name, array $arguments)
{
$return = null;
// unset, isset, reset
- 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 _classesExtends
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function _classesExtends($names, array $classes, 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 _getPartCell
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function _getPartCell($line_index, $cell_index, $part)
{
if (property_exists($this, $part)) {
if (is_null($line_index)) {
$line_index = $this->getLineSize();
- 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 _classesInNamespaces
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function _classesInNamespaces($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
Method intToRoman
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function intToRoman($a = null)
{
if (is_null($a)) {
return null;
}
Method load
has 33 lines of code (exceeds 25 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)) {