AthensFramework/Propel

View on GitHub

Showing 7 of 7 total issues

PropelQueryWrapper has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class PropelQueryWrapper extends AbstractQueryWrapper implements QueryWrapperInterface
{
    use PropelORMWrapperTrait;

    /** @var ModelCriteria */
Severity: Minor
Found in src/orm-wrapper/PropelQueryWrapper.php - About 2 hrs to fix

    Function addBehaviorConstraintsToFields has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function addBehaviorConstraintsToFields(array $fields)
        {
    
            $behaviors = $this->getTableMap()->getBehaviors();
            $validateBehaviors = array_key_exists("validate", $behaviors) === true ? $behaviors["validate"] : [];
    Severity: Minor
    Found in src/orm-wrapper/PropelObjectWrapper.php - About 2 hrs 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 fieldsFromColumns has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function fieldsFromColumns()
        {
            $fields = [];
            $initial = "";
    
    
    Severity: Minor
    Found in src/orm-wrapper/PropelObjectWrapper.php - About 1 hr to fix

      Function fieldsFromColumns has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function fieldsFromColumns()
          {
              $fields = [];
              $initial = "";
      
      
      Severity: Minor
      Found in src/orm-wrapper/PropelObjectWrapper.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 fillFromFields has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          public function fillFromFields(array $fields)
          {
              $fieldNames = array_keys($fields);
              $columns = $this->getColumns();
      
      
      Severity: Minor
      Found in src/orm-wrapper/PropelObjectWrapper.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 addBehaviorConstraintsToFields has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function addBehaviorConstraintsToFields(array $fields)
          {
      
              $behaviors = $this->getTableMap()->getBehaviors();
              $validateBehaviors = array_key_exists("validate", $behaviors) === true ? $behaviors["validate"] : [];
      Severity: Minor
      Found in src/orm-wrapper/PropelObjectWrapper.php - About 1 hr to fix

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

            protected function canQueryColumnName($columnName)
            {
        
                /** @var boolean $columnNameIsQualified */
                $columnNameIsQualified = strpos($columnName, '.') !== false;
        Severity: Minor
        Found in src/orm-wrapper/PropelQueryWrapper.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

        Severity
        Category
        Status
        Source
        Language