Showing 280 of 426 total issues
Method each
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function each($code)
{
$yml = Yaml::fetch();
$tests = Yaml::each('tests');
$doc = array();
Method dt
has 33 lines of code (exceeds 25 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();
Method replaceUrls
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function replaceUrls($url, $html)
{
$settings = Model\Setting::fetchAll();
if ($settings['base_url'])
Method check
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'css_invisible', self::$unspec, 5);
Validate\Set::log($url, 'css_background_image_only', self::$unspec, 5);
if ( ! static::$do_css_check) return;
Method countTags
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function countTags($tags, $ignores)
{
$tags = is_null($tags) ? array() : $tags;
$opens = array();
Function check
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function check()
{
$pages = array();
foreach (Model\Page::fetchAll() as $page)
{
- 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 setSecondaryDeleteElement
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function setSecondaryDeleteElement($str, $eles)
{
$del_eles = array();
$pattern = '/\<label[^\>]*?\>.*?\<\/label\>/is';
preg_match_all($pattern, $str, $mms);
- 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 getAriaLabel
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function getAriaLabel($eles, $text = '')
{
$text = is_bool($text) ? '' : $text;
if (strpos($eles, 'aria-label') !== 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 check
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function check()
{
$keyword = Input::post('keyword', '');
$use_re = Input::post('use_re', 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 __get
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __get($name)
{
if (property_exists($this, $name))
{
// errors?
- 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 eliminateRadioCheckNames
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static function eliminateRadioCheckNames($mms, $radio_check_names)
{
foreach ($mms as $mm)
{
$mm_mod = Element::ignoreElementsByStr($mm);
- 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 fetch4Validation
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function fetch4Validation($url, $html)
{
$vals = static::fetchAll();
$html = empty($html) ? Element\Get\Each::firstTag(Element\Get::ignoredHtml($url)) : $html;
- 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 fetchAll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function fetchAll($force = false)
{
if ( ! is_null(static::$vals) && ! $force) return static::$vals;
$vals = array();
$commons = 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 echoGetUrls
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function echoGetUrls($url, $urls, $base_url)
{
// already added
if (in_array($url, $urls))
{
Method criterionDbio
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function criterionDbio($criterion)
{
$results = Input::postArr('results', NULL);
$iclchks = Input::postArr('iclchks', NULL);
$chk = Input::postArr('chk', NULL);
Method check
has 30 lines of code (exceeds 25 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');
Method actionValidation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function actionValidation()
{
// vals
$url = Input::post('url', Input::get('url', ''));
$user_agent = Input::post('user_agent', '');
Method recoverStr
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function recoverStr($val)
{
return str_replace(
array(
self::$quoted_double,
Method isFisrtOfToday
has 29 lines of code (exceeds 25 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');
Method evaluateTotal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function evaluateTotal()
{
// fetch pages
$args = array(
'list' => 'done',