rathena / FluxCP

Function with cyclomatic complexity higher than threshold found PHP-R1006
Anti-pattern
Minor
a month ago6 months old
tln_sanitize has a cyclomatic complexity of 33 with "Very high" risk
 839
 840 * @return string                       Sanitized html safe to show on your pages.
 841 */
 842function tln_sanitize( 843    $body,
 844    $tag_list,
 845    $rm_tags_with_content,
tln_fixstyle has a cyclomatic complexity of 19 with "High" risk
 663    }
 664}
 665
 666function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images) 667{
 668    // workaround for </style> in between comments
 669    $content = '';
tln_fixurl has a cyclomatic complexity of 19 with "High" risk
 595    return $attary;
 596}
 597
 598function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_images) 599{
 600    $sQuote = '"';
 601    $attvalue = trim($attvalue);
tln_fixatts has a cyclomatic complexity of 19 with "High" risk
 511 * @param boolean $block_external_images
 512 * @return array with modified attributes.
 513 */
 514function tln_fixatts( 515    $tagname,
 516    $attary,
 517    $rm_attnames,
tln_getnxtag has a cyclomatic complexity of 26 with "Very high" risk
 154 *				   - integer where the tag ends (ending ">")
 155 *				   first three members will be false, if the tag is invalid.
 156 */
 157function tln_getnxtag($body, $offset) 158{
 159    if ($offset > strlen($body)) {
 160        return false;