honeybee/honeybee

View on GitHub

Showing 178 of 178 total issues

Consider simplifying this complex logical expression.
Open

        if (empty($index) || $index == '_all' ||
            (is_array($index) && count($index) > 1) ||
            (is_string($index) && strpos($index, ',') !== false)
        ) {
            throw new RuntimeError(

    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            CriteriaList $search_criteria_list,
            CriteriaList $filter_criteria_list,
            CriteriaList $sort_criteria_list,
            $offset,
            $limit
    Severity: Minor
    Found in src/Infrastructure/DataAccess/Query/CriteriaQuery.php - About 35 mins to fix

      Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $name,
              array $attributes = [],
              OptionsInterface $options = null,
              EntityTypeInterface $parent = null,
              AttributeInterface $parent_attribute = null
      Severity: Minor
      Found in src/Model/Aggregate/ReferencedEntityType.php - About 35 mins to fix

        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                Closure $event_handlers_callback,
                Closure $event_filters_callback,
                Closure $event_transport_callback,
                SettingsInterface $settings,
                $activated
        Severity: Minor
        Found in src/Infrastructure/Event/Bus/Subscription/LazyEventSubscription.php - About 35 mins to fix

          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $name,
                  array $attributes = [],
                  OptionsInterface $options = null,
                  EntityTypeInterface $parent = null,
                  AttributeInterface $parent_attribute = null
          Severity: Minor
          Found in src/Projection/ReferencedEntityType.php - About 35 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    AggregateRootTypeInterface $aggregate_root_type,
                    DataAccessServiceInterface $data_access_service,
                    EventBusInterface $event_bus,
                    WorkflowServiceInterface $workflow_service,
                    LoggerInterface $logger
            Severity: Minor
            Found in src/Model/Command/AggregateRootCommandHandler.php - About 35 mins to fix

              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      ConfigInterface $config,
                      AggregateRootTypeInterface $aggregate_root_type,
                      StorageReaderInterface $event_reader,
                      StorageWriterInterface $event_writer,
                      LoggerInterface $logger
              Severity: Minor
              Found in src/Infrastructure/DataAccess/UnitOfWork/UnitOfWork.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        StorageWriterMap $storage_writer_map,
                        StorageReaderMap $storage_reader_map,
                        FinderMap $finder_map,
                        QueryServiceMap $query_service_map,
                        UnitOfWorkMap $uow_map
                Severity: Minor
                Found in src/Infrastructure/DataAccess/DataAccessService.php - About 35 mins to fix

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          EventTransportInterface $event_transport,
                          EventFilterList $event_filters,
                          EventHandlerList $event_handlers,
                          SettingsInterface $settings,
                          $activated
                  Severity: Minor
                  Found in src/Infrastructure/Event/Bus/Subscription/EventSubscription.php - About 35 mins to fix

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

                        public function toArray()
                        {
                            $data = array();
                    
                            foreach ($this as $key => $value) {
                    Severity: Minor
                    Found in src/Infrastructure/Config/Settings.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 reconstituteFrom has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function reconstituteFrom(AggregateRootEventList $history)
                        {
                            if (!$this->history->isEmpty()) {
                                throw new ReconstitutionError('Trying to reconstitute history on an already initialized aggregate-root.');
                            }
                    Severity: Minor
                    Found in src/Model/Aggregate/AggregateRoot.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 copyFilesToTempLocation has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function copyFilesToTempLocation($folder)
                        {
                            if (empty($folder) || !is_readable($folder)) {
                                return;
                            }
                    Severity: Minor
                    Found in src/Infrastructure/Fixture/Fixture.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 getStatus has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getStatus()
                        {
                            if ($this->config->has('fake_status')) {
                                return new Status($this, $this->config->get('fake_status'));
                            }
                    Severity: Minor
                    Found in src/Infrastructure/DataAccess/Connector/GuzzleConnector.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 importFixtureFromFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function importFixtureFromFile($filename)
                        {
                            if (!is_readable($filename)) {
                                throw new RuntimeError(sprintf('Fixture data is not readable at "%s"', $filename));
                            }
                    Severity: Minor
                    Found in src/Infrastructure/Fixture/Fixture.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 getByIdentifiers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getByIdentifiers(array $identifiers)
                        {
                            Assertion::notEmpty($identifiers);
                    
                            $index = $this->getIndex();

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

                        public static function getAsString($var)
                        {
                            if ($var instanceof Exception) {
                                return (string)$var;
                            } elseif (is_object($var)) {
                    Severity: Minor
                    Found in src/Common/Util/StringToolkit.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 setEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function setEvent($event_state)
                        {
                            if (is_array($event_state)) {
                                if (!isset($event_state[self::OBJECT_TYPE])) {
                                    throw new RuntimeError('Unable to create event without type information.');
                    Severity: Minor
                    Found in src/Infrastructure/Job/Bundle/DistributeEventJob.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 setEvent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function setEvent($event_state)
                        {
                            if (is_array($event_state)) {
                                if (!isset($event_state[self::OBJECT_TYPE])) {
                                    throw new RuntimeError('Unable to create event without type information.');
                    Severity: Minor
                    Found in src/Infrastructure/Job/Bundle/ExecuteEventHandlersJob.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 setCommand has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function setCommand($command_state)
                        {
                            if (is_array($command_state)) {
                                if (!isset($command_state[self::OBJECT_TYPE])) {
                                    throw new RuntimeError('Unable to create command without type information.');
                    Severity: Minor
                    Found in src/Infrastructure/Job/Bundle/ExecuteCommandJob.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 getStatus has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getStatus()
                        {
                            if ($this->config->has('fake_status')) {
                                return new Status($this, $this->config->get('fake_status'));
                            }
                    Severity: Minor
                    Found in src/Infrastructure/DataAccess/Connector/GuzzleRetryConnector.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