Showing 65 of 86 total issues
Method var_replace
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function var_replace( $html, $tag_left_delimiter, $tag_right_delimiter, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level = null, $echo = null ){
//all variables
if( preg_match_all( '/' . $tag_left_delimiter . '\$(\w+(?:\.\${0,1}[A-Za-z0-9_]+)*(?:(?:\[\${0,1}[A-Za-z0-9_]+\])|(?:\-\>\${0,1}[A-Za-z0-9_]+))*)(.*?)' . $tag_right_delimiter . '/', $html, $matches ) ){
Method _getRemoteIniFile
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _getRemoteIniFile($url, $path)
{
// local and remote file are the same, no update possible
if ($url == $path) {
return false;
Method _make_counter_
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _make_counter_(){
global $par__id;
global $cnf__username,$cnf__usermail,$cnf__userpass,$cnf__start_count,$cnf__mtime_unique_accs,$cnf__expire_on_midnight,$cnf__count_per_pages,$cnf__licit_domains_list,$cnf__IPmasks_ignore_list,$cnf__htime_sync_server,$cnf__last_entries,$cnf__passwd_protect,$cnf__limit_view;
global $aux__now,$aux__location;
Method func_replace
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function func_replace( $html, $tag_left_delimiter, $tag_right_delimiter, $php_left_delimiter = null, $php_right_delimiter = null, $loop_level = null, $echo = null ){
preg_match_all( '/' . '\{\#{0,1}(\"{0,1}.*?\"{0,1})(\|\w.*?)\#{0,1}\}' . '/', $html, $matches );
for( $i=0, $n=count($matches[0]); $i<$n; $i++ ){
Method _panel0_
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _panel0_(){
global $par__id;
global $cnf__mtime_unique_accs,$cnf__expire_on_midnight,$cnf__count_per_pages;
global $dat__counter,$dat__started;
global $aux__now,$aux__calendar;
Method updateCache
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateCache()
{
$lockfile = $this->cacheDir . 'cache.lock';
$lockRes = fopen($lockfile, 'w+');
Method _graph_
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
function _graph_($__data,$__type,$__title,$__header1,$__header2,$__header3,$__colsize1,$__colsize2,$__colsize3,$__unknownitem,$__strcut,$__restrict){
Function path_replace
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function path_replace( $html, $tpl_basedir ){
if( self::$path_replace ){
$tpl_dir = self::$base_url . self::$tpl_dir . $tpl_basedir;
- 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 _licit_domain_
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function _licit_domain_(){
global $cnf__licit_domains_list;
global $aux__location;
if(count($cnf__licit_domains_list)===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 rgxMapper
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
var rgxMapper = function (ua, arrays) {
var i = 0, j, k, p, q, matches, match;
// loop through all regexes maps
Function _get_hits_
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function _get_hits_($__timestamp, $__type) {
settype($__timestamp,"integer");
settype($__type,"string");
$__year=date("Y",$__timestamp);
- 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 _array2string
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function _array2string($array)
{
$content = "array(\n";
foreach ($array as $key => $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 _licit_request_
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function _licit_request_(){
global $aux__location;
if(($__normloc=$aux__location->_normalize_())===FALSE)
return 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
Method path_replace
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function path_replace( $html, $tpl_basedir ){
if( self::$path_replace ){
$tpl_dir = self::$base_url . self::$tpl_dir . $tpl_basedir;
Function _fcreate_
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function _fcreate_($__name,$__content){
settype($__name,"string");
settype($__content,"string");
if(($__fid=fopen(WEB_ROOT.$__name,"wb"))!==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 _max_hits_in_date_
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function _max_hits_in_date_() {
global $aux__now;
$__max=array("timestamp"=>$aux__now,"hits"=>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
Method printDebug
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function printDebug(RainTpl_Exception $e){
if (!self::$debug) {
throw $e;
}
$output = sprintf('<h2>Exception: %s</h2><h3>%s</h3><p>template: %s</p>',
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($__url){
settype($__url,"string");
global $inf__engine,$inf__keyban;
Function printDebug
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function printDebug(RainTpl_Exception $e){
if (!self::$debug) {
throw $e;
}
$output = sprintf('<h2>Exception: %s</h2><h3>%s</h3><p>template: %s</p>',
- 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 _make_year_
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function _make_year_($__year) {
settype($__year,"string");
if(!array_key_exists($__year,$this->__year)){
$this->__year[$__year]=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"