DerDu/SPHERE-Framework

View on GitHub

Showing 5,014 of 7,620 total issues

Function setUTF8 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function setUTF8()
    {

        $Statement = array();
        if( $this->Database->getPlatform()->getName() == "mysql" ) {
Severity: Minor
Found in System/Database/Fitting/Structure.php - About 1 hr 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 createCategory has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function createCategory(
        IFormInterface $Form,
        $Category
    ) {

Severity: Minor
Found in Application/Education/Lesson/Subject/Service.php - About 1 hr 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 addCriteria has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    final public function addCriteria($Property, $Value, $Comparison = self::COMPARISON_EXACT)
    {
        if (is_array($Value) && $Comparison != self::COMPARISON_IN) {
            foreach ($Value as $Part) {
                $Expression = $this->getExpressionComparison($Property, $Part, $Comparison);
Severity: Minor
Found in System/Database/Filter/Logic/AbstractLogic.php - About 1 hr 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 countReligion has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private static function countReligion(
        TblStudent $tblStudent,
        TblLevel $tblLevel,
        $countReligionArray
    ) {

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 addForeignKey has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function addForeignKey(DBALTable &$KeyTarget, DBALTable $KeySource, $AllowNull = false)
    {

        if (!$this->Database->hasColumn($KeyTarget->getName(), $KeySource->getName())) {
            if ($AllowNull) {
Severity: Minor
Found in System/Database/Fitting/Structure.php - About 1 hr 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 innerJoin has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    protected function innerJoin($List)
    {
        $Result = array();
        /** @var AbstractView $Node0 */
        foreach ($List[0] as $Node0) {
Severity: Minor
Found in System/Database/Filter/Link/Repository/Node2.php - About 1 hr 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 performQueryAnalysis has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function performQueryAnalysis($query) {
        if (preg_match('/^\\s*SELECT\\s*`?[a-zA-Z0-9]*`?\\.?\\*/i', $query)) {
            $this->hints[] = 'Use <code>SELECT *</code> only if you need all columns from table';
        }
        if (preg_match('/ORDER BY RAND()/i', $query)) {
Severity: Minor
Found in xplain/app/Explainer.php - About 1 hr 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 performQueryAnalysis has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function performQueryAnalysis($query) {
        if (preg_match('/^\\s*SELECT\\s\\*/i', $query)) {
            $this->hints[] = 'Use <code>SELECT *</code> only if you need all columns from table';
        }
        if (preg_match('/ORDER BY RAND()/i', $query)) {
Severity: Minor
Found in xplain/app/Explainer.class.php - About 1 hr 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

Method __construct has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(
        $Name,
        $Label = '',
        $Placeholder = '',
        $Data = array(),
Severity: Minor
Found in Common/Frontend/Form/Repository/Field/SelectCompleter.php - About 1 hr to fix

    Method __construct has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function __construct($ExchangeType = self::EXCHANGE_TYPE_PLUS, $Data = array(), $Title = '', $HandlerClass = '')
        {
    
            if (is_integer($ExchangeType) && empty($HandlerClass)) {
    
    
    Severity: Minor
    Found in Common/Frontend/Link/Repository/Exchange.php - About 1 hr to fix

      Function callContent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              var callContent = function (Content, Callback) {
                  if (!occupyPipeline()) return;
                  onSuccessEvent(Content);
                  if (Callback == false) {
                      Callback = function () {
      Severity: Minor
      Found in Common/Script/ModAjax.js - About 1 hr to fix

        Method createSponsorAssociation has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function createSponsorAssociation(
                IFormInterface $Form,
                $SponsorAssociation
            ) {
        
        
        Severity: Minor
        Found in Application/Setting/Consumer/SponsorAssociation/Service.php - About 1 hr to fix

          Method createResponsibility has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createResponsibility(
                  IFormInterface $Form,
                  $Responsibility
              ) {
          
          
          Severity: Minor
          Found in Application/Setting/Consumer/Responsibility/Service.php - About 1 hr to fix

            Method getWebToCompanyModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function getWebToCompanyModal($form, TblCompany $tblCompany,  $ToCompanyId = null)
                {
                    if ($ToCompanyId) {
                        $title = new Title(new Edit() . ' Internet Adresse bearbeiten');
                    } else {
            Severity: Minor
            Found in Application/Api/Contact/ApiWebToCompany.php - About 1 hr to fix

              Method getMailToCompanyModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function getMailToCompanyModal($form, TblCompany $tblCompany,  $ToCompanyId = null)
                  {
                      if ($ToCompanyId) {
                          $title = new Title(new Edit() . ' E-Mail Adresse bearbeiten');
                      } else {
              Severity: Minor
              Found in Application/Api/Contact/ApiMailToCompany.php - About 1 hr to fix

                Method updateGroup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function updateGroup(IFormInterface $Form = null, TblGroup $tblGroup, $Group)
                    {
                
                        /**
                         * Skip to Frontend
                Severity: Minor
                Found in Application/Corporation/Group/Service.php - About 1 hr to fix

                  Method getPhoneToCompanyModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function getPhoneToCompanyModal($form, TblCompany $tblCompany,  $ToCompanyId = null)
                      {
                          if ($ToCompanyId) {
                              $title = new Title(new Edit() . ' Telefonnummer bearbeiten');
                          } else {
                  Severity: Minor
                  Found in Application/Api/Contact/ApiPhoneToCompany.php - About 1 hr to fix

                    Method getRelationshipToCompanyModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function getRelationshipToCompanyModal($form, TblPerson $tblPerson,  $ToCompanyId = null)
                        {
                            if ($ToCompanyId) {
                                $title = new Title(new Edit() . ' Institutionenbeziehung bearbeiten');
                            } else {
                    Severity: Minor
                    Found in Application/Api/Contact/ApiRelationshipToCompany.php - About 1 hr to fix

                      Method getPhoneToPersonModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function getPhoneToPersonModal($form, TblPerson $tblPerson,  $ToPersonId = null)
                          {
                              if ($ToPersonId) {
                                  $title = new Title(new Edit() . ' Telefonnummer bearbeiten');
                              } else {
                      Severity: Minor
                      Found in Application/Api/Contact/ApiPhoneToPerson.php - About 1 hr to fix

                        Method getAddressToPersonModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function getAddressToPersonModal($form, TblPerson $tblPerson,  $ToPersonId = null)
                            {
                                if ($ToPersonId) {
                                    $title = new Title(new Edit() . ' Adresse bearbeiten');
                                } else {
                        Severity: Minor
                        Found in Application/Api/Contact/ApiAddressToPerson.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language