Showing 426 of 426 total issues
Method setDefault
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setDefault()
{
// results
Model\Setting::delete('bulk_results');
Method edit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function edit($is_add = false, $users = array(), $current_user_id = NULL)
{
$item = array();
if ($id = intval(Input::get('id')))
{
Method fetch
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function fetch()
{
if ( ! empty(static::$data)) return static::$data;
// load Spyc - YAML lib.
Method doEvaluate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function doEvaluate($cs, $ngs, $yml)
{
// passed
$passed = self::passed($cs, $yml);
Method getText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getText($url, $code_str, $place, $key, $num_of_err)
{
$yml = Yaml::fetch();
$current_err = Validate::setCurrentErr($url, $code_str);
Method uploadImg
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function uploadImg($target_path, $id = '', $old_path = '')
{
$file = Input::file('file');
if (empty($file['name'])) return $old_path;
Method key2link
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function key2link($text, $doc_url = '')
{
preg_match_all("/\[[^\]]+?\]/", $text, $ms);
if ( ! $ms[0]) return $text;
Method failedOrDoOtherAction
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function failedOrDoOtherAction($url, $doc_root, $target_html)
{
$do_validate = true;
// basic auth failed
Method report
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function report()
{
if (class_exists('ZipArchive'))
{
if (ini_get('zlib.output_compression'))
Function ignoreElementsOrComments
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static function ignoreElementsOrComments($ignore_vals, $html)
{
$replaces_ignores = array();
if ($ignore_vals)
{
- 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 removeQueryStrings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function removeQueryStrings($uri, $query_strings = array())
{
if (strpos($uri, '?') !== false)
{
// all query strings
- 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 doctype
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function doctype($url)
{
if (empty(Validate::$hl_htmls[$url])) return false;
$html = Validate::$hl_htmls[$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 set
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function set(&$array, $key, $value = null)
{
if (is_null($key))
{
$array = $value;
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public static function check($url)
{
Validate\Set::log($url, 'same_alt_and_filename_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 10 (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 check
has a Cognitive Complexity of 10 (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 updateIcls
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static function updateIcls($url)
{
$bulk = Input::postArr('iclchks');
$vals = 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 getUrls
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static function getUrls($url)
{
// fetch attributes
$ua = 'using';
$html = Model\Html::fetch($url, $ua);
- 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 filterList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static function filterList($pages, $list = 'all')
{
$vals = array();
foreach ($pages 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 makeArray
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function makeArray($css)
{
// remove comments, import or so
$css = preg_replace('/\/\*.+?\*\//is', '', $css);
$css = preg_replace('/^@import.+?$/mis', '', $css);
- 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"