Showing 51 of 51 total issues
Method date_format_ru
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function date_format_ru($date)
{
$date = strtotime($date);
$day = date("d", $date);
$month_en = date("F", $date);
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function render($view, $data = array())
{
// TODO: Make rendering as external system, to split up these 3 rendering options
// Объявить ассоциативный массив переменных в данном контексте
- 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 dir
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function dir($path, $type = null, $modifier = '', & $result = array(), $max_level = NULL, $level = 0, $restrict = array('.git', '.svn', '.hg', '.settings'))
{
// Если установлено ограничение на глубину - выйдем
if (isset($max_level) && $level > $max_level) return $result;
Function array_power_set
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function array_power_set(array $array, $size = null)
{
// initialize by adding the empty set
$results = array(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
Method time_difference
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function time_difference($enddate, $startdate = null)
{
// Get current timestamp
if (!isset($startdate)) $startdate = time();
else $startdate = strtotime($startdate);
Method debug_parse_args
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function & debug_parse_args(array $args)
{
// Соберем сюда описание аргументов функции
$result = array();
Function load
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function load($class)
{
// Get just class name without ns
$className = self::getOnlyClass($class);
// Get just ns without 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 output
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function output()
{
// Получим последнюю ошибку системы
$lerror = error_get_last();
- 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 v
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function v($name, $realName = NULL)
{
// Получим указатель на текущий модуль
$m = m();
- 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 dir
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function dir($path, $type = null, $modifier = '', & $result = array(), $max_level = NULL, $level = 0, $restrict = array('.git', '.svn', '.hg', '.settings'))
Method handler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function handler($errno, $error_msg, $errfile = NULL, $errline = NULL, $errcontext = NULL, $backtrace = NULL)
Method debug_to_string
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function debug_to_string($errno = NULL, $file = NULL, $line = NULL, $class = NULL, $function = NULL, $args = NULL)
Method toError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function toError($errno, $desc, $error_msg, $errfile = NULL, $errline = NULL, $class = NULL)
Method vimg
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function vimg($src, $id = '', $class = '', $alt = '', $dummy = null)
Method isval
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function isval($name, $value = null, $success = null, $failure = null, $inverse = false)
Method mail_send
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function mail_send($to, $from = 'info@samsonos.com', $message = '', $subject = '', $from_user = '')
Method vhref
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function vhref($name, $href = null, $class = null, $id = null, $title = null)
Function debug_parse_markers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function debug_parse_markers($pattern, array & $args = NULL)
{
// Текущий номер аргумента для подмены
$a_ind = 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 parseURL
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function parseURL(array &$args, $leaveDefaultLocale = true)
{
// Iterate defined site locales
foreach (self::$locales as $locale) {
// Search locale string as URL argument
- 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 set
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function set(array $available_locales)
{
// Переберем локализации
foreach ($available_locales as $locale) {
$_locale = strtolower($locale);
- 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"