Showing 426 of 426 total issues
Method dt
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function dt($url, $code_str, $place, $key, $current_err, $lv, $num_of_err)
Avoid classes with short names like Db. Configured minimum length is 3. Open
class Db
{
public $dbh;
protected $name;
protected $dbtype;
- Read upRead up
- Exclude checks
ShortClassName
Since: 2.9
Detects when classes or interfaces have a very short name.
Example
class Fo {
}
interface Fo {
}
Source https://phpmd.org/rules/naming.html#shortclassname
Avoid classes with short names like Db. Configured minimum length is 3. Open
class Db extends \Kontiki\Db
{
protected static $version = null;
/**
- Read upRead up
- Exclude checks
ShortClassName
Since: 2.9
Detects when classes or interfaces have a very short name.
Example
class Fo {
}
interface Fo {
}
Source https://phpmd.org/rules/naming.html#shortclassname
Avoid classes with short names like Ua. Configured minimum length is 3. Open
class Ua
{
protected static $uas = null;
public static $fields = array(
'id' => 1,
- Read upRead up
- Exclude checks
ShortClassName
Since: 2.9
Detects when classes or interfaces have a very short name.
Example
class Fo {
}
interface Fo {
}
Source https://phpmd.org/rules/naming.html#shortclassname
Method submitless
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function submitless($n, $url, $v, $action, $uniqued_types, $uniqued_eles)
Function check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url, $regex)
{
if (A11YC_DB_TYPE == 'none') return;
$str = Element\Get::ignoredHtml($url);
- 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 check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'alt_attr_of_img', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
$ms = Element\Get::elementsByRe($str, 'ignores', 'imgs');
- 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 check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
$error_names = array(
'labelless',
'submitless',
- 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 isIgnorable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function isIgnorable($str)
{
$attrs = Element\Get::attributes($str);
// Strictly this is not so correct. but it seems be considered.
- 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 evaluateTotal
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function evaluateTotal()
{
// fetch pages
$args = array(
'list' => 'done',
- 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 check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'must_be_numeric_attr', self::$unspec, 1);
$str = Element\Get::ignoredHtml($url);
$ms = Element\Get::elementsByRe($str, 'ignores', 'tags');
- 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 errorAndLog
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function errorAndLog($exp, $url, $error_name, $count, $id, $str)
Function isFisrtOfToday
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function isFisrtOfToday ()
{
if ( ! is_null(static::$is_first_of_day)) return static::$is_first_of_day;
$today = date('Y-m-d');
- 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 sqlite
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function sqlite ($path, $file, $is_force = FALSE)
{
if (defined('A11YC_DB_TYPE') && A11YC_DB_TYPE == 'mysql') return;
if ( ! file_exists($path.$file))
- 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 checkBgImageWithoutBgColor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function checkBgImageWithoutBgColor($url, $selector, $k, $props)
{
$is_exists_bg = false;
if (
isset($props['background']) ||
- 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 dt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function dt($url, $code_str, $place, $key, $current_err, $lv, $num_of_err)
{
if ( ! is_array($current_err)) Util::error('invalid value was given');
$yml = Yaml::fetch();
- 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 base
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function base($value, $url, $codes, $ua, $force, $default = array())
Function actionImport
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function actionImport()
{
$is_waic_imported = Model\Setting::fetch('is_waic_imported');
if ($is_waic_imported) Util::redirect(A11YC_URL);
- 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 removeViewSrc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static function removeViewSrc($html, $messages, $show_link_to_issue)
{
foreach($messages as $k => $message)
{
if (isset($message['dt']))
- 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 fetch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function fetch($key, $url = '*', $default = array(), $force = false, $version = null, $group_id = null)
{
$vals = self::fetchAll($force, $version, $group_id);
if ($key == 'global')
- 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"