DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function createCity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function createCity($Code, $Name, $District)
    {

        $Manager = $this->getConnection()->getEntityManager();
        $tblCityList= $Manager->getEntity('TblCity')->findBy(array(
Severity: Minor
Found in Application/Contact/Address/Service/Data.php - About 35 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 getEditBasicContent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getEditBasicContent($CompanyId = null)
    {

        $tblCompany = false;
        if ($CompanyId && ($tblCompany = Company::useService()->getCompanyById($CompanyId))) {
Severity: Minor
Found in Application/Corporation/Company/FrontendReadOnly.php - About 35 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 checkInputAddress has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function checkInputAddress($PersonId, $Street = array(), $City = array())
    {
        $Error = false;
        $form = $this->formAddress($PersonId);
        if (isset($Street['Name']) && empty($Street['Name'])) {
Severity: Minor
Found in Application/Api/Contact/ApiContactAddress.php - About 35 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 loadRelationshipsMessage has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function loadRelationshipsMessage($Relationship)
    {

        if ($Relationship) {
            foreach ($Relationship as $personId => $value) {
Severity: Minor
Found in Application/Api/Contact/ApiAddressToPerson.php - About 35 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 frontendGroup has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendGroup($Group)
    {

        $Stage = new Stage('Gruppen', 'Übersicht');
        $Stage->addButton(new Standard('Zurück', '/Corporation', new ChevronLeft()));
Severity: Minor
Found in Application/Corporation/Group/Frontend.php - About 35 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 createCompanyService has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function createCompanyService($Company)
    {
        if (($tblCompany = (new Data($this->getBinding()))->createCompany($Company['Name'],
            $Company['ExtendedName'],
            $Company['Description']))
Severity: Minor
Found in Application/Corporation/Company/Service.php - About 35 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 changeFilterCount has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function changeFilterCount($WorkSpaceId = null, $direction = '')
    {
        $tblWorkSpace = Individual::useService()->getWorkSpaceById($WorkSpaceId);
        if ($tblWorkSpace) {
            $FieldCount = $tblWorkSpace->getFieldCount();
Severity: Minor
Found in Application/Api/Reporting/Individual/ApiIndividual.php - About 35 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 frontendAjaxTest has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function frontendAjaxTest( $ABC = null, $B = null, $C = null, $D = null )
    {

        if( !$ABC && ( $B||$C||$D ) ) {
            return json_encode( 88888888 );
Severity: Minor
Found in Application/Api/Test/Frontend.php - About 35 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 saveAddItem has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function saveAddItem($Identifier = '', $Item = array(), $Group = array())
    {

        // Handle error's
        if($form = $this->checkInputItem($Identifier, '', $Item, $Group)){
Severity: Minor
Found in Application/Api/Billing/Inventory/ApiItem.php - About 35 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 showDeleteCalculation has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function showDeleteCalculation($Identifier = '', $CalculationId = '')
    {

        $tblItemCalculation = Item::useService()->getItemCalculationById($CalculationId);
        if($tblItemCalculation){
Severity: Minor
Found in Application/Api/Billing/Inventory/ItemCalculation.php - About 35 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 openDeleteSupportModal has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function openDeleteSupportModal($PersonId, $SupportId)
    {
        $tblSupport = Student::useService()->getSupportById($SupportId);
        if(!$tblSupport){
            return new Danger('Eintrag nicht gefunden.');
Severity: Minor
Found in Application/Api/People/Meta/Support/ApiSupport.php - About 35 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 formStudentFilter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function formStudentFilter($modalField)
    {

        /** @var AbstractField $Field */
        $Field = unserialize(base64_decode($modalField));
Severity: Minor
Found in Application/Api/MassReplace/StudentFilter.php - About 35 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 replaceStartDate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function replaceStartDate(
        $modalField,
        $CloneField,
        $PersonIdArray = array(),
        $Id = null
Severity: Minor
Found in Application/Api/People/Meta/Student/MassReplaceStudent.php - About 35 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 formReference has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function formReference($Identifier = '', $PersonId = '', $ReferenceId = '')

    {

        // choose between Add and Edit
Severity: Minor
Found in Application/Api/Billing/Accounting/ApiBankReference.php - About 35 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 replaceSubject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function replaceSubject(
        $modalField,
        $CloneField,
        $TypeId,
        $RankingId,
Severity: Minor
Found in Application/Api/People/Meta/Subject/MassReplaceSubject.php - About 35 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 tableAvailableSubject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function tableAvailableSubject($DivisionId)
    {

        // get Content
        $tblDivision = DivisionAPP::useService()->getDivisionById($DivisionId);
Severity: Minor
Found in Application/Api/Education/Division/SubjectSelect.php - About 35 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 serviceRemoveSubject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function serviceRemoveSubject($Id = null, $DivisionId = null)
    {

        $tblSubject = Subject::useService()->getSubjectById($Id);
        $tblDivision = DivisionAPP::useService()->getDivisionById($DivisionId);
Severity: Minor
Found in Application/Api/Education/Division/SubjectSelect.php - About 35 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 buildDocument has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function buildDocument($pageList = array())
    {
        $document = new Document();

        foreach ($pageList as $subjectPages) {
Severity: Minor
Found in Application/Api/Document/Standard/Repository/Billing/DocumentWarning.php - About 35 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 buildDocument has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function buildDocument($pageList = array())
    {
        $document = new Document();

        foreach ($pageList as $subjectPages) {
Severity: Minor
Found in Application/Api/Document/Standard/Repository/Billing/Billing.php - About 35 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 buildRemarkPage has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function buildRemarkPage(TblType $tblType = null)
    {
        $textSize = '11px';
        $textSizeSmall = '9px';
        $height = '15px';

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