DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Avoid too many return statements within this method.
Open

            return false;
Severity: Major
Found in Application/Education/Lesson/Division/Service.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return $Form;
    Severity: Major
    Found in Application/Education/Lesson/Subject/Service.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $Form;
      Severity: Major
      Found in Application/Education/Lesson/Division/Service.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return $Form;
        Severity: Major
        Found in Application/Education/Lesson/Division/Service.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return $Stage;
          Severity: Major
          Found in Application/Education/Lesson/Division/Frontend.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return $ObjectA->getId() - $ObjectB->getId();
            Severity: Major
            Found in Application/Education/Lesson/Division/Frontend.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return $Stage;
              Severity: Major
              Found in Application/Education/Lesson/Subject/Frontend.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return $this->EntityRemove;
                Severity: Major
                Found in System/Database/Fitting/Element.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return $this->getExpressionBuilder()->eq('E.' . $Property,
                                      $this->getExpressionBuilder()->literal($Value));
                  Severity: Major
                  Found in System/Database/Filter/Logic/AbstractLogic.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                        return new \DateTime();
                    Severity: Major
                    Found in System/Database/Fitting/Element.php - About 30 mins to fix

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

                          public function __construct($Code, $Message = null, $IsReportable = true)
                          {
                      
                              $this->Template = $this->getTemplate(__DIR__.'/Error.twig');
                      
                      
                      Severity: Minor
                      Found in Common/Window/Error.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __construct($Route, $Timeout = Redirect::TIMEOUT_WAIT, $Data = array())
                          {
                      
                              if ($Route === null) {
                                  $Route = parse_url($this->getRequest()->getUrl(), PHP_URL_PATH);
                      Severity: Minor
                      Found in Common/Window/Redirect.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 getContent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getContent()
                          {
                      
                              switch ($this->getLibrary()) {
                                  case 1:
                      Severity: Minor
                      Found in Common/Frontend/Form/Repository/Field/SelectBox.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 handleArguments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected function handleArguments($Controller, RouteParameter $Route)
                          {
                      
                              $Reflection = new \ReflectionMethod($Controller[0], $Controller[1]);
                              $MethodParameters = $Reflection->getParameters();
                      Severity: Minor
                      Found in Common/Router.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 initCloudCache has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function initCloudCache()
                          {
                      
                              if (!isset($_SESSION['Memcached-Slot'])) {
                                  try {
                      Severity: Minor
                      Found in Common/Main.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 setError has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function setError($Message, IIconInterface $Icon = null)
                          {
                              if( $this->Template ) {
                                  $this->setTemplateVariable('ElementGroup', 'has-error has-feedback');
                                  if (null !== $Icon) {
                      Severity: Minor
                      Found in Common/Frontend/Form/Repository/AbstractField.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 setSuccess has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function setSuccess($Message, IIconInterface $Icon = null)
                          {
                      
                              if( $this->Template ) {
                                  $this->setTemplateVariable('ElementGroup', 'has-success has-feedback');
                      Severity: Minor
                      Found in Common/Frontend/Form/Repository/AbstractField.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 updateSetting has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function updateSetting(
                              IFormInterface $Form,
                              TblAccount $tblAccount,
                              $Setting
                          ) {
                      Severity: Minor
                      Found in Application/Setting/MyAccount/Service.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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __construct($Route, $Timeout = Redirect::TIMEOUT_WAIT, $Data = array())
                          {
                      
                              if ($Route === null) {
                                  $Route = parse_url($this->getRequest()->getUrl(), PHP_URL_PATH);
                      Severity: Minor
                      Found in Common/Window/RedirectScript.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 updateMailToPerson has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function updateMailToPerson(
                              TblToPerson $tblToPerson,
                              $Address,
                              $Type
                          ) {
                      Severity: Minor
                      Found in Application/Contact/Mail/Service.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