Function createPrepareCertificates
has a Cognitive Complexity of 170 (exceeds 5 allowed). Consider refactoring. Open
public function createPrepareCertificates(
IFormInterface $Form = null,
TblGenerateCertificate $tblGenerateCertificate,
$Data = null
) {
- 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
File Service.php
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Created by PhpStorm.
* User: Kauschke
* Date: 25.11.2016
Function getPossibleCertificates
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function getPossibleCertificates(
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
TblConsumer $tblConsumer = null
) {
- 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 setCertificateTemplates
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function setCertificateTemplates(
TblPrepareCertificate $tblPrepare,
&$countStudents = 0,
&$certificateNameList = array(),
&$schoolNameList = array()
- 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 createPrepareCertificates
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createPrepareCertificates(
IFormInterface $Form = null,
TblGenerateCertificate $tblGenerateCertificate,
$Data = null
) {
Method updateGenerateCertificate
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGenerateCertificate(
IFormInterface $Form = null,
TblGenerateCertificate $tblGenerateCertificate,
$Data = null
) {
Method getPossibleCertificates
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPossibleCertificates(
TblPrepareCertificate $tblPrepare,
TblPerson $tblPerson,
TblConsumer $tblConsumer = null
) {
Method createGenerateCertificate
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createGenerateCertificate(IFormInterface $Form = null, $Data = null)
{
/**
* Skip to Frontend
Method updateAbiturSettings
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAbiturSettings(
IFormInterface $form,
TblGenerateCertificate $tblGenerateCertificate,
$Data
) {
Function updateGenerateCertificate
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function updateGenerateCertificate(
IFormInterface $Form = null,
TblGenerateCertificate $tblGenerateCertificate,
$Data = null
) {
- 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 setCertificateTemplates
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setCertificateTemplates(
TblPrepareCertificate $tblPrepare,
&$countStudents = 0,
&$certificateNameList = array(),
&$schoolNameList = array()
Function checkAutoSelect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function checkAutoSelect(TblPerson $tblPerson, TblType $tblType)
{
if ($tblType->getName() == 'Mittelschule / Oberschule') {
if (($tblSupport = Student::useService()->getSupportForReportingByPerson($tblPerson))
- 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 createGenerateCertificate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function createGenerateCertificate(IFormInterface $Form = null, $Data = null)
{
/**
* Skip to Frontend
- 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
Avoid deeply nested control flow statements. Open
if ($tblStudentTransfer) {
$tblCourse = $tblStudentTransfer->getServiceTblCourse();
}
Function editCertificateTemplates
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function editCertificateTemplates(
IFormInterface $Form = null,
TblPrepareCertificate $tblPrepare,
$Data = null
) {
- 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
Avoid deeply nested control flow statements. Open
if ($tblType && !$this->checkAutoSelect($tblPerson, $tblType)) {
continue;
}
Avoid deeply nested control flow statements. Open
if (($tblPrepareStudent = Prepare::useService()->getPrepareStudentBy($tblPrepare,
$tblPerson))
) {
if (($tblCertificate = $tblPrepareStudent->getServiceTblCertificate())) {
continue;
Avoid deeply nested control flow statements. Open
if ($tblConsumerBySession) {
// Eigene Vorlage
if (($certificateList = $this->getPossibleCertificates($tblPrepare, $tblPerson,
$tblConsumerBySession))
) {
Consider simplifying this complex logical expression. Open
if (($tblDivision = $tblPrepare->getServiceTblDivision())
&& ($tblLevel = $tblDivision->getTblLevel())
&& ($tblSchoolType = $tblLevel->getServiceTblType())
&& $tblPrepare->getServiceTblGenerateCertificate()
&& ($tblCertificateType = $tblPrepare->getServiceTblGenerateCertificate()->getServiceTblCertificateType())
Function updateAbiturSettings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function updateAbiturSettings(
IFormInterface $form,
TblGenerateCertificate $tblGenerateCertificate,
$Data
) {
- 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"