DerDu/SPHERE-Framework

View on GitHub

Showing 7,620 of 7,620 total issues

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

    public function getDisplayTeacher()
    {

        if (($tblPerson = $this->getServiceTblPersonTeacher())){
            if (($tblTeacher = Teacher::useService()->getTeacherByPerson($tblPerson))){

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 getGradeTypeDisplayName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getGradeTypeDisplayName()
    {
        if (($tblGradeType = $this->getTblGradeType())){
            return $tblGradeType ? $tblGradeType->getDisplayName() : '';
        } else {

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 createScoreGroup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function createScoreGroup(IFormInterface $Stage = null, $ScoreGroup = null)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Education/Graduation/Gradebook/ScoreRule/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 destroyScoreRule has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function destroyScoreRule(TblScoreRule $tblScoreRule)
    {

        $Manager = $this->getConnection()->getEntityManager();
        /** @var TblScoreRule $Entity */
Severity: Minor
Found in Application/Education/Graduation/Gradebook/ScoreRule/Data.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 frontendEditGradeType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendEditGradeType($Id = null, $GradeType = null)
    {

        $Stage = new Stage('Zensuren-Typ', 'Bearbeiten');

Severity: Minor
Found in Application/Education/Graduation/Gradebook/Frontend.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 updateScoreCondition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateScoreCondition(IFormInterface $Stage = null, $Id, $ScoreCondition)
    {

        /**
         * Skip to Frontend
Severity: Minor
Found in Application/Education/Graduation/Gradebook/ScoreRule/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 updatePrepareDivisionSetApproved has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function updatePrepareDivisionSetApproved(TblPrepareCertificate $tblPrepare)
    {

        if (($tblDivision = $tblPrepare->getServiceTblDivision())) {
            if (($tblGenerateCertificate = $tblPrepare->getServiceTblGenerateCertificate())
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 calcAbiturExamGradesTotalForWrittenExam has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function calcAbiturExamGradesTotalForWrittenExam(
        TblPrepareAdditionalGrade $tblWrittenExamGrade,
        TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
    ) {

Severity: Minor
Found in Application/Education/Certificate/Prepare/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 createLeaveStudentFromForm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function createLeaveStudentFromForm(
        IFormInterface $form = null,
        TblPerson $tblPerson,
        TblDivision $tblDivision,
        $Data
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 getCertificateMultiLeaveContent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCertificateMultiLeaveContent(TblDivision $tblDivision) {
        $Content = array();

        if (($tblLeaveStudentList = $this->getLeaveStudentAllByDivision($tblDivision))) {
            foreach ($tblLeaveStudentList as $tblLeaveStudent) {
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 calcAbiturExamGradesTotalForVerbalExam has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function calcAbiturExamGradesTotalForVerbalExam(
        TblPrepareAdditionalGrade $tblVerbalExamGrade,
        TblPrepareAdditionalGrade $tblExtraVerbalGrade = null
    ) {

Severity: Minor
Found in Application/Education/Certificate/Prepare/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 setTablePrepareGrade has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function setTablePrepareGrade(Schema &$Schema, Table $tblPrepare)
    {

        $Table = $this->getConnection()->createTable($Schema, 'tblPrepareGrade');
        if (!$this->getConnection()->hasColumn('tblPrepareGrade', 'serviceTblPerson')) {
Severity: Minor
Found in Application/Education/Certificate/Prepare/Service/Setup.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 updatePrepareStudentSetApproved has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function updatePrepareStudentSetApproved(TblPrepareStudent $tblPrepareStudent)
    {

        if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())
            && ($tblPrepare = $tblPrepareStudent->getTblPrepareCertificate())
Severity: Minor
Found in Application/Education/Certificate/Prepare/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 frontendSelectDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendSelectDivision()
    {
        $hasHeadmasterRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Headmaster');
        $hasTeacherRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Teacher');
        $hasDiplomaRight = Access::useService()->hasAuthorization('/Education/Certificate/Prepare/Diploma');
Severity: Minor
Found in Application/Education/Certificate/Prepare/Frontend.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 setAvailableExamsSubjectToArray has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function setAvailableExamsSubjectToArray($subjectName, $isP3 = true)
    {

        $tblSubject = Subject::useService()->getSubjectByName($subjectName);
        if (!$tblSubject && $subjectName == 'Gemeinschaftskunde/Rechtserziehung/Wirtschaft') {
Severity: Minor
Found in Application/Education/Certificate/Prepare/Abitur/BlockII.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 frontendPrintCertificateHistoryDivision has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendPrintCertificateHistoryDivision()
    {

        $Stage = new Stage('Zeugnis', 'Klasse auswählen');
        $Stage->addButton(new Standard(
Severity: Minor
Found in Application/Education/Certificate/PrintCertificate/Frontend.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 isDivisionSorted has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private function isDivisionSorted(TblDivision $tblDivision)
    {

        $TempList = $this->getCachedEntityListBy(__Method__, $this->getConnection()->getEntityManager(),
            'TblDivisionStudent',
Severity: Minor
Found in Application/Education/Lesson/Division/Service/Data.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 getSubjectReligionAll has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSubjectReligionAll()
    {

        $tblSubjectList = array();
        $tblGroup = $this->getGroupByIdentifier('STANDARD');
Severity: Minor
Found in Application/Education/Lesson/Subject/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 getSubjectElectiveAll has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSubjectElectiveAll()
    {

        $tblSubjectList = array();
        $tblCategory = $this->getGroupByIdentifier('ELECTIVE');
Severity: Minor
Found in Application/Education/Lesson/Subject/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 isOrientation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function isOrientation(TblSubject $tblSubject)
    {
        if (($tblSubjectOrientationAll = $this->getSubjectOrientationAll())) {
            foreach ($tblSubjectOrientationAll as $tblSubjectOrientation) {
                if ($tblSubjectOrientation->getId() == $tblSubject->getId()) {
Severity: Minor
Found in Application/Education/Lesson/Subject/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