DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Method addPersonsToSubject has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

        IFormInterface $Form,
        $Id,
        $SubjectGroup,
        $Group,
        TblSubject $tblSubject,
Severity: Major
Found in Application/Education/Lesson/Subject/Service.php - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                            if ($tblPrepare->getServiceTblGenerateCertificate()
                                && ($tblCertificateType = $tblPrepare->getServiceTblGenerateCertificate()->getServiceTblCertificateType())
                                && ($tblCertificateType->getIdentifier() == 'HALF_YEAR' || $tblCertificateType->getIdentifier() == 'YEAR')
                                && ($tblPrepareStudent = Prepare::useService()->getPrepareStudentBy($tblPrepare,
                                    $tblPerson))
    Severity: Major
    Found in Application/Document/Generator/Service.php - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                  if (($tblPrepare = $item->getTblPrepareCertificate())
                      && ($tblDivision = $tblPrepare->getServiceTblDivision())
                      && ($tblLevel = $tblDivision->getTblLevel())
                      && ($tblPrepare->getServiceTblGenerateCertificate())
                      && ($tblCertificateType = $tblPrepare->getServiceTblGenerateCertificate()->getServiceTblCertificateType())
      Severity: Major
      Found in Application/Document/Generator/Service.php - About 1 hr to fix

        Method setNewSchoolStarter has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                &$Content,
                TblPerson $tblPerson,
                TblStudent $tblStudent,
                TblLevel $tblLevel,
                TblDivision $tblDivision,

          Method setSchoolTypeLastYear has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  &$Content,
                  $tblPastYearList,
                  TblPerson $tblPerson,
                  $tblCourse,
                  TblLevel $tblLevel,

            Consider simplifying this complex logical expression.
            Open

                        if (($tblPrepare = $item->getTblPrepareCertificate())
                            && ($tblDivision = $tblPrepare->getServiceTblDivision())
                            && ($tblLevel = $tblDivision->getTblLevel())
                            && ($tblPrepare->getServiceTblGenerateCertificate())
                            && ($tblCertificateType = $tblPrepare->getServiceTblGenerateCertificate()->getServiceTblCertificateType())
            Severity: Major
            Found in Application/Document/Generator/Service.php - About 1 hr to fix

              Method countForeignLanguages has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      TblStudent $tblStudent,
                      TblLevel $tblLevel,
                      TblType $tblType,
                      &$Content,
                      $gender,

                Consider simplifying this complex logical expression.
                Open

                                if (($tblAppointedDateTask = $tblPrepare->getServiceTblAppointedDateTask())
                                    && $tblYear
                                    && ($tblPeriodList = $tblYear->getTblPeriodAll($tblLevel && $tblLevel->getName() == '12'))
                                    && ($tblPeriod = $tblAppointedDateTask->getServiceTblPeriodByDivision($tblDivision))
                                    && ($tblFirstPeriod = current($tblPeriodList))
                Severity: Major
                Found in Application/Document/Generator/Service.php - About 1 hr to fix

                  Method __construct has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          Identifier $Identifier,
                          ITypeInterface $Type,
                          $Username,
                          $Password,
                          $Database,
                  Severity: Major
                  Found in System/Database/Link/Connection.php - About 1 hr to fix

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

                        public function __construct(
                            $Name,
                            $Label = '',
                            $Placeholder = '',
                            $Data = array(),
                    Severity: Minor
                    Found in Common/Frontend/Form/Repository/Field/SelectCompleter.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 setSource has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function setSource($Location, $Combined = false, $Additional = false)
                        {
                    
                            $PathBase = $this->getRequest()->getPathBase();
                            if ($Combined) {
                    Severity: Minor
                    Found in Common/Style.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 __construct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function __construct(Route $Route, Name $Name, Icon $Icon = null, $Active = false, $ToolTip = false)
                        {
                    
                            $this->Route = $Route;
                            $this->Name = $Name;
                    Severity: Minor
                    Found in Common/Window/Navigation/Link.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 isValid has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function isValid()
                        {
                    
                            $Authenticator = (new Authenticator(new Get()))->getAuthenticator();
                    
                    
                    Severity: Minor
                    Found in Common/Frontend/Link/Repository/Backward/Step.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 __construct has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function __construct(
                            $Name,
                            $Label = '',
                            $Placeholder = '',
                            $Data = array(),
                    Severity: Minor
                    Found in Common/Frontend/Form/Repository/Field/AutoCompleter.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 frontendLayoutToken has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function frontendLayoutToken()
                        {
                    
                            $headerList = array(
                                'Serial' => 'Seriennummer',
                    Severity: Minor
                    Found in Application/Setting/Authorization/Token/Frontend.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 widgetSchool has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static function widgetSchool()
                        {
                            $tblSchoolAll = School::useService()->getSchoolAll();
                            if ($tblSchoolAll) {
                                /** @var TblSchool $tblSchool */
                    Severity: Minor
                    Found in Application/Setting/Consumer/Consumer.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 frontendDestroyToken has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function frontendDestroyToken($Id, $Confirm = false)
                        {
                    
                            $Stage = new Stage('Hardware-Schlüssel', 'Löschen');
                            if ($Id) {
                    Severity: Minor
                    Found in Application/Setting/Authorization/Token/Frontend.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 updateAddressToCompanyByApi has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function updateAddressToCompanyByApi(
                            TblToCompany $tblToCompany,
                            $Street,
                            $City,
                            $State,
                    Severity: Minor
                    Found in Application/Contact/Address/Service.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 updateAddressToPersonByApi has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function updateAddressToPersonByApi(
                            TblToPerson $tblToPerson,
                            $Street,
                            $City,
                            $State,
                    Severity: Minor
                    Found in Application/Contact/Address/Service.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 fetchDashboard has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public static function fetchDashboard($Location)
                        {
                    
                            $Dashboard = '<div class="Location-'.$Location.' gridster"><ul style="list-style: none; display: none;">';
                            if (isset( self::$Widget[$Location] )) {
                    Severity: Minor
                    Found in Application/Dispatcher.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