lucliscio/fanKounter

View on GitHub

Showing 65 of 86 total issues

Avoid too many return statements within this method.
Open

        return '';
Severity: Major
Found in src/libs/Browscap.php - About 30 mins to fix

    Function _max_hits_in_month_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

      function _max_hits_in_month_() {
        global $aux__now;
    
        $__max=array("timestamp"=>$aux__now,"hits"=>0);
    
    Severity: Minor
    Found in src/cal.inc.php - About 25 mins to fix

    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 configure has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        static function configure( $setting, $value = null ){
            if( is_array( $setting ) )
                foreach( $setting as $key => $value )
                    self::configure( $key, $value );
            else if( property_exists( __CLASS__, $setting ) ){
    Severity: Minor
    Found in src/libs/rain.tpl.class.php - About 25 mins to fix

    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 _unique_accs_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        function _unique_accs_(){
            global $par__id;
            global $cnf__mtime_unique_accs,$cnf__expire_on_midnight,$cnf__count_per_pages;
            global $aux__now,$aux__ip,$aux__agent,$aux__location;
    
    
    Severity: Minor
    Found in src/counter.php - About 25 mins to fix

    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 _flock_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    function _flock_(){
      global $par__id;
      global $__lock_fid;
    
      if(FLOCK){
    Severity: Minor
    Found in src/sys.inc.php - About 25 mins to fix

    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

    Severity
    Category
    Status
    Source
    Language