lucliscio/fanKounter

View on GitHub

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 ) ){
Severity: Major
Found in src/libs/rain.tpl.class.php - About 2 hrs to fix

    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;
    Severity: Minor
    Found in src/libs/Browscap.php - About 1 hr to fix

      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;
      
      Severity: Minor
      Found in src/mak.inc.php - About 1 hr to fix

        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++ ){
        Severity: Minor
        Found in src/libs/rain.tpl.class.php - About 1 hr to fix

          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;
          Severity: Minor
          Found in src/stats.php - About 1 hr to fix

            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+');
            Severity: Minor
            Found in src/libs/Browscap.php - About 1 hr to fix

              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){
              Severity: Major
              Found in src/stats.php - About 1 hr to fix

                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;
                Severity: Minor
                Found in src/libs/rain.tpl.class.php - About 1 hr 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 _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)
                Severity: Minor
                Found in src/counter.php - About 1 hr 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 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
                Severity: Minor
                Found in src/libs/js/ua-parser.js - About 1 hr to fix

                  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);
                  Severity: Minor
                  Found in src/cal.inc.php - About 1 hr 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 _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) {
                  Severity: Minor
                  Found in src/libs/Browscap.php - About 1 hr 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 _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;
                  Severity: Minor
                  Found in src/mak.inc.php - About 1 hr 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

                  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;
                  Severity: Minor
                  Found in src/libs/rain.tpl.class.php - About 1 hr to fix

                    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){
                    Severity: Minor
                    Found in src/sys.inc.php - About 1 hr 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 _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);
                    
                    Severity: Minor
                    Found in src/cal.inc.php - About 1 hr 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

                    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>',
                    Severity: Minor
                    Found in src/libs/rain.tpl.class.php - About 1 hr to fix

                      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;
                      
                      Severity: Minor
                      Found in src/url.inc.php - About 1 hr to fix

                        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>',
                        Severity: Minor
                        Found in src/libs/rain.tpl.class.php - About 55 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 _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();
                        Severity: Minor
                        Found in src/cal.inc.php - About 55 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