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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
array $attributes = [],
OptionsInterface $options = null,
EntityTypeInterface $parent = null,
AttributeInterface $parent_attribute = null
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$name,
array $attributes = [],
OptionsInterface $options = null,
EntityTypeInterface $parent = null,
AttributeInterface $parent_attribute = null
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
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
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
EventTransportInterface $event_transport,
EventFilterList $event_filters,
EventHandlerList $event_handlers,
SettingsInterface $settings,
$activated
Function toArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function toArray()
{
$data = array();
foreach ($this as $key => $value) {
- Read upRead up
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.');
}
- Read upRead up
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;
}
- Read upRead up
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'));
}
- Read upRead up
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));
}
- Read upRead up
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();
- Read upRead up
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)) {
- Read upRead up
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.');
- Read upRead up
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.');
- Read upRead up
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.');
- Read upRead up
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'));
}
- Read upRead up
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"