krafthaus/bauhaus

View on GitHub

Showing 476 of 1,049 total issues

Avoid too many return statements within this function.
Open

                return false;
Severity: Major
Found in bower_components/tinymce/plugins/lists/plugin.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return 'video/ogg';
    Severity: Major
    Found in bower_components/tinymce/plugins/media/plugin.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return false;
      Severity: Major
      Found in bower_components/tinymce/plugins/lists/plugin.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return true;
        Severity: Major
        Found in bower_components/tinymce/plugins/lists/plugin.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return '';
          Severity: Major
          Found in bower_components/tinymce/plugins/media/plugin.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return container;
            Severity: Major
            Found in bower_components/tinymce/plugins/textpattern/plugin.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return 'application/x-shockwave-flash';
              Severity: Major
              Found in bower_components/tinymce/plugins/media/plugin.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return true;
                Severity: Major
                Found in bower_components/tinymce/plugins/lists/plugin.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return;
                  Severity: Major
                  Found in bower_components/tinymce/plugins/textpattern/plugin.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return;
                    Severity: Major
                    Found in bower_components/tinymce/plugins/textpattern/plugin.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return element;
                      Severity: Major
                      Found in bower_components/tinymce/plugins/noneditable/plugin.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return false;
                        Severity: Major
                        Found in bower_components/tinymce/plugins/lists/plugin.js - About 30 mins to fix

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

                              public function destroy()
                              {
                                  $mapper = $this->getMapper();
                                  $admin  = $mapper->getAdmin();
                          
                          
                          Severity: Minor
                          Found in src/KraftHaus/Bauhaus/Builder/FormBuilder.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 export has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function export()
                              {
                                  $result = [];
                                  foreach ($this->getListBuilder()->getResult() as $item) {
                                      foreach ($item->getFields() as $field) {
                          Severity: Minor
                          Found in src/KraftHaus/Bauhaus/Export/Format/XmlFormat.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 export has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function export()
                              {
                                  $result = [];
                                  foreach ($this->getListBuilder()->getResult() as $item) {
                                      foreach ($item->getFields() as $field) {
                          Severity: Minor
                          Found in src/KraftHaus/Bauhaus/Export/Format/XlsFormat.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 render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function render()
                              {
                                  switch ($this->getContext()) {
                                      case BaseField::CONTEXT_LIST:
                                          $values = [];
                          Severity: Minor
                          Found in src/KraftHaus/Bauhaus/Field/HasManyField.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