Function __construct
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
TblDivision $tblDivision,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepareCertificate
) {
- Read upRead up
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
Method getContent
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getContent($Data, $GroupId)
{
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('LEVEL-10'))
&& ($tblPrepareAdditionalGradeList = Prepare::useService()->getPrepareAdditionalGradeListBy(
File LevelTen.php
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: Kauschke
* Date: 16.03.2018
Method __construct
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
TblDivision $tblDivision,
TblPerson $tblPerson,
TblPrepareCertificate $tblPrepareCertificate
) {
Function setData
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function setData()
{
$dataList = array();
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('LEVEL-10'))) {
foreach ($this->availableSubjectList as $tblSubject) {
- Read upRead up
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 setAvailableSubjects
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function setAvailableSubjects()
{
$this->setCourses();
$list = array();
foreach ($this->subjectList as $acronym => $name) {
- Read upRead up
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
Method setData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function setData()
{
$dataList = array();
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('LEVEL-10'))) {
foreach ($this->availableSubjectList as $tblSubject) {
Method setAvailableSubjects
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function setAvailableSubjects()
{
$this->setCourses();
$list = array();
foreach ($this->subjectList as $acronym => $name) {
Function getContent
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getContent($Data, $GroupId)
{
if (($tblPrepareAdditionalGradeType = Prepare::useService()->getPrepareAdditionalGradeTypeByIdentifier('LEVEL-10'))
&& ($tblPrepareAdditionalGradeList = Prepare::useService()->getPrepareAdditionalGradeListBy(
- Read upRead up
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
Consider simplifying this complex logical expression. Open
if ($tblPrepare->getServiceTblGenerateCertificate()
&& ($tblCertificateType = $tblPrepare->getServiceTblGenerateCertificate()->getServiceTblCertificateType())
&& ($tblCertificateType->getIdentifier() == 'YEAR')
&& ($tblPrepareStudent = Prepare::useService()->getPrepareStudentBy($tblPrepare,
$this->tblPerson))
Consider simplifying this complex logical expression. Open
if ($tblPrepareStudentLevelTen
&& $tblPrepareStudentLevelTen->getTblPrepareCertificate()
&& $tblPrepareStudentLevelTen->getServiceTblPerson()
&& $tblPrepareStudentLevelTen->getTblPrepareCertificate()->getServiceTblDivision()
&& ($tblTestType = Evaluation::useService()->getTestTypeByIdentifier('APPOINTED_DATE_TASK'))