honeybee/trellis

View on GitHub

Showing 177 of 223 total issues

Avoid too many return statements within this method.
Open

                return false;
Severity: Major
Found in src/Runtime/Attribute/EmailList/EmailListRule.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return false;
    Severity: Major
    Found in src/Runtime/Validator/Rule/Type/UrlRule.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return false;
      Severity: Major
      Found in src/Runtime/Validator/Rule/Type/UrlRule.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return false;
        Severity: Major
        Found in src/Runtime/Validator/Rule/Type/KeyValueListRule.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return true;
          Severity: Major
          Found in src/Runtime/Validator/Rule/Type/KeyValueListRule.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return true;
            Severity: Major
            Found in src/Runtime/Attribute/GeoPoint/GeoPointRule.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return true;
              Severity: Major
              Found in src/Runtime/Attribute/AssetList/AssetListValueHolder.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return true;
                Severity: Major
                Found in src/Runtime/Attribute/IntegerList/IntegerListRule.php - About 30 mins to fix

                  Function toArray has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function toArray()
                      {
                          $data = [];
                  
                          foreach ($this->items as $option) {
                  Severity: Minor
                  Found in src/CodeGen/Schema/OptionDefinitionList.php - About 25 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 resolveBootstrapFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function resolveBootstrapFile(array $settings, $config_dir)
                      {
                          $bootstrap_file = null;
                          if (isset($settings['bootstrap_file'])) {
                              if ($settings['bootstrap_file'][0] === '.') {
                  Severity: Minor
                  Found in src/CodeGen/Parser/Config/ConfigIniParser.php - About 25 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 similarArrays has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function similarArrays(array $data, array $other_data)
                      {
                          $keys = array_keys($data);
                          $other_keys = array_keys($other_data);
                  
                  
                  Severity: Minor
                  Found in src/Runtime/ValueHolder/ComplexValue.php - About 25 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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function __construct(array $data)
                      {
                          parent::__construct([]);
                  
                          // check for mandatory property values
                  Severity: Minor
                  Found in src/Runtime/ValueHolder/ComplexValue.php - About 25 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 __construct has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function __construct($name, array $options = [])
                      {
                          // use sensible default max length for URLs
                          if (!array_key_exists(self::OPTION_MAX_LENGTH, $options)) {
                              // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
                  Severity: Minor
                  Found in src/Runtime/Validator/Rule/Type/UrlRule.php - About 25 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 getHiddenProperties has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function getHiddenProperties()
                      {
                          if (!$this->hidden_properties_) {
                              $this->hidden_properties_ = [];
                              $class = new ReflectionClass($this);
                  Severity: Minor
                  Found in src/Common/BaseObject.php - About 25 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 getValues has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getValues(array $attribute_names = [])
                      {
                          $values = [];
                          if (!empty($attribute_names)) {
                              foreach ($attribute_names as $attribute_name) {
                  Severity: Minor
                  Found in src/Runtime/Entity/Entity.php - About 25 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 splitPath has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected static function splitPath($value_path)
                      {
                          $path_tuples = [];
                          $path_parts = explode(self::PATH_DELIMITER, $value_path);
                          $next_tuple = [];
                  Severity: Minor
                  Found in src/Runtime/Attribute/AttributeValuePath.php - About 25 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 entityMatchesOffsetSpec has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected static function entityMatchesOffsetSpec($entity, $offset_spec, array $type_offsets)
                      {
                          $type_prefix = $entity->getType()->getPrefix();
                          $offset = $type_offsets['_all'];
                  
                  
                  Severity: Minor
                  Found in src/Runtime/Attribute/AttributeValuePath.php - About 25 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