Application/Transfer/Indiware/Export/AppointmentGrade/Frontend.php
Method frontendExport
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function frontendExport()
{
$Stage = new Stage('Export', 'Stichtagsnoten eines Halbjahres');
File Frontend.php
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace SPHERE\Application\Transfer\Indiware\Export\AppointmentGrade;
use SPHERE\Application\Api\Transfer\Indiware\AppointmentGrade\ApiAppointmentGrade;
Method frontendAppointmentGradeUpload
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function frontendAppointmentGradeUpload(
UploadedFile $File = null,
$Period = null,
$TaskId = null
) {
Function frontendAppointmentGradeUpload
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
public function frontendAppointmentGradeUpload(
UploadedFile $File = null,
$Period = null,
$TaskId = 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 frontendAppointmentGradePrepare
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function frontendAppointmentGradePrepare()
{
$Stage = new Stage('Indiware', 'Datentransfer');
$Stage->addButton(new Standard('Zurück', '/Transfer/Indiware/Export', new ChevronLeft()));
$Stage->setMessage('Exportvorbereitung / Daten exportieren');
Function frontendExport
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
public function frontendExport()
{
$Stage = new Stage('Export', 'Stichtagsnoten eines Halbjahres');
- 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 too many return
statements within this method. Open
Open
return $Stage->setContent(new SuccessMessage('Reihenfolge erfolgreich aufgenommen. Weiterleitung erfolgt.'))
.new Redirect('/Transfer/Indiware/Export/AppointmentGrade', Redirect::TIMEOUT_SUCCESS);
Avoid too many return
statements within this method. Open
Open
return $Stage->setContent(new WarningMessage('Ungültige Dateiendung!'))
.new Redirect('/Transfer/Indiware/Export/AppointmentGrade/Prepare', Redirect::TIMEOUT_ERROR);