qcminecraft/Carbon-Forum-F

View on GitHub

Showing 506 of 851 total issues

Avoid too many return statements within this method.
Open

            return;
Severity: Major
Found in library/Uploader.class.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return;
    Severity: Major
    Found in library/Uploader.class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return false;
      Severity: Major
      Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return false;
        Severity: Major
        Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return false;
          Severity: Major
          Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return false;
            Severity: Major
            Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return $this->server_caps[$name];
              Severity: Major
              Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return;
                Severity: Major
                Found in library/Uploader.class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return false;
                  Severity: Major
                  Found in library/PHPMailer.smtp.class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return;
                    Severity: Major
                    Found in library/Uploader.class.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return;
                      Severity: Major
                      Found in library/Uploader.class.php - About 30 mins to fix

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

                        function trim3(str) {
                            if(str){
                                str = str.replace(/^(\s|\u00A0)+/, '');
                                for (var i = str.length - 1; i >= 0; i--) {
                                    if (/\S/.test(str.charAt(i))) {
                        Severity: Minor
                        Found in static/js/mobile/global.js - 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 RecoverTopicContents has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function RecoverTopicContents() {
                            var DraftTitle = localStorage.getItem(Prefix + "TopicTitle");
                            var DraftContent = localStorage.getItem(Prefix + "TopicContent");
                            var DraftTagsList = JSON.parse(localStorage.getItem(Prefix + "TopicTagsList"));
                            if (DraftTitle) {
                        Severity: Minor
                        Found in static/js/default/new.function.js - 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 trim3 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function trim3(str) {
                            if (str) {
                                str = str.replace(/^(\s|\u00A0)+/, '');
                                for (var i = str.length - 1; i >= 0; i--) {
                                    if (/\S/.test(str.charAt(i))) {
                        Severity: Minor
                        Found in static/js/default/topic.function.js - 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 CheckUserNameExist has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function CheckUserNameExist() {
                            if ($("#UserName").val()) {
                                $.ajax({
                                    url: WebsitePath + '/json/user_exist',
                                    data: {
                        Severity: Minor
                        Found in static/js/default/global.js - 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 tagUploadIcon has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function tagUploadIcon($TagInfo)
                            {
                                Auth(3);
                                if ($_FILES['TagIcon']['size'] && $_FILES['TagIcon']['size'] < 1048576) {
                                    require(LibraryPath . "ImageResize.class.php");
                        Severity: Minor
                        Found in controller/manage.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 each has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        baidu.each = baidu.array.forEach = baidu.array.each = function (source, iterator, thisObject) {
                            var returnValue, item, i, len = source.length;
                            
                            if ('function' == typeof iterator) {
                                for (i = 0; i < len; i++) {
                        Severity: Minor
                        Found in static/editor/dialogs/wordimage/tangram.js - 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 callByBrowser has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        baidu.sio.callByBrowser = function (url, opt_callback, opt_options) {
                            var scr = document.createElement("SCRIPT"),
                                scriptLoaded = 0,
                                options = opt_options || {},
                                charset = options['charset'],
                        Severity: Minor
                        Found in static/editor/dialogs/wordimage/tangram.js - 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 deleteUpload has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private function deleteUpload($uploadRecordList)
                            {
                                foreach ($uploadRecordList as $uploadRecord) {
                                    $numberDuplicateFiles = $this->db->single('SELECT count(*) FROM ' . PREFIX . 'upload 
                                            WHERE 
                        Severity: Minor
                        Found in controller/manage.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 punyencodeAddress has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function punyencodeAddress($address)
                            {
                                // Verify we have required functions, CharSet, and at-sign.
                                if ($this->idnSupported() and
                                    !empty($this->CharSet) and
                        Severity: Minor
                        Found in library/PHPMailer.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

                        Severity
                        Category
                        Status
                        Source
                        Language