Function createBillingDocumentPdf
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
public static function createBillingDocumentPdf($Data = array(), $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
- 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 Creator.php
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace SPHERE\Application\Api\Document;
use MOC\V\Component\Document\Component\Parameter\Repository\PaperOrientationParameter;
use MOC\V\Component\Document\Document as PdfDocument;
Method createBillingDocumentPdf
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createBillingDocumentPdf($Data = array(), $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
Method createBillingDocumentWarningPdf
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createBillingDocumentWarningPdf($Data = array(), $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
Function createMultiPdf
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultiPdf(TblPerson $tblPerson, $tblSchoolTypeList, $paperOrientation = 'PORTRAIT')
{
$Data['Person']['Id'] = $tblPerson->getId();
$pageList = 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 createMultiGradebookPdf
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createMultiGradebookPdf($DivisionId, $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
Function createBillingDocumentWarningPdf
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function createBillingDocumentWarningPdf($Data = array(), $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
- 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 createMultiGradebookOverviewPdf
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultiGradebookOverviewPdf($DivisionId, $paperOrientation = Creator::PAPERORIENTATION_LANDSCAPE
, $Redirect = true)
{
// Warteseite
- 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 createMultiGradebookPdf
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultiGradebookPdf($DivisionId, $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
- 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 createMultiGradebookOverviewPdf
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createMultiGradebookOverviewPdf($DivisionId, $paperOrientation = Creator::PAPERORIENTATION_LANDSCAPE
, $Redirect = true)
{
// Warteseite
Method createMultiPasswordPdf
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createMultiPasswordPdf($Data, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT)
{
$multiPassword = new MultiPassword($Data);
$pageList = $multiPassword->getPageList();
Function createPdf
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function createPdf($PersonId, $DocumentClass, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT, $Data = array())
{
if (($tblPerson = Person::useService()->getPersonById($PersonId))
&& class_exists($DocumentClass)
- 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 createDataPdf
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function createDataPdf($Data, $DocumentName, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT)
{
if (!empty($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"
Further reading
Method createMultiPdf
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createMultiPdf(TblPerson $tblPerson, $tblSchoolTypeList, $paperOrientation = 'PORTRAIT')
{
$Data['Person']['Id'] = $tblPerson->getId();
$pageList = array();
Method createKamenzPdf
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createKamenzPdf($Type = '', $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
Method createGradebookPdf
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createGradebookPdf($DivisionSubjectId, $Redirect = true)
{
if ($Redirect) {
return \SPHERE\Application\Api\Education\Certificate\Generator\Creator::displayWaitingPage(
Method createPdf
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createPdf($PersonId, $DocumentClass, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT, $Data = array())
{
if (($tblPerson = Person::useService()->getPersonById($PersonId))
&& class_exists($DocumentClass)
Function createChangePasswordPdf
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function createChangePasswordPdf($Data, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT)
{
if (!empty($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"
Further reading
Function createMultiPasswordPdf
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function createMultiPasswordPdf($Data, $paperOrientation = Creator::PAPERORIENTATION_PORTRAIT)
{
$multiPassword = new MultiPassword($Data);
$pageList = $multiPassword->getPageList();
- 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 ($isList) {
$maxPdfPages = Balance::useFrontend()->getMaxPdfPages();
if ($countPdfs > $maxPdfPages * $list && $countPdfs <= $maxPdfPages * ($list + 1)) {
// werden hinzugefĆ¼gt
} else {
Method buildDummyFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static function buildDummyFile($DocumentClass, $Data = array(), $pageList = array(),
$paperOrientation = Creator::PAPERORIENTATION_PORTRAIT, $isDestruction = true)