Showing 178 of 178 total issues
Function read
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function read($identifier, SettingsInterface $settings = null)
{
try {
$view_params = [
'startkey' => sprintf(self::STARTKEY_FILTER, $identifier),
- 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 tryToReadMetadata
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function tryToReadMetadata()
{
$serialized_metadata = fgets($this->file_pointer);
if (!$serialized_metadata) {
return new BulkStreamError(
- 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 tryToExecute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function tryToExecute(CommandInterface $command, $retry_count = 0)
{
$aggregate_root = $this->checkoutOrCreateAggregateRoot($command);
$this->doExecute($command, $aggregate_root);
$comitted_events = $this->getUnitOfWork()->commit()->filter(function (AggregateRootEventList $event_list) {
- 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 getByIdentifier
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getByIdentifier($identifier)
{
Assertion::string($identifier);
Assertion::notBlank($identifier);
- 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
Avoid too many return
statements within this method. Open
return Status::failing($this, [ 'message' => 'Error on "' . $path . '": ' . $e->getMessage() ]);
Avoid too many return
statements within this method. Open
return (string)$arg;
Avoid too many return
statements within this method. Open
return Status::failing(
$this,
[
'message' => 'GET failed: ' . $path,
'headers' => $response->getHeaders(),
Avoid too many return
statements within this method. Open
return 'false';
Avoid too many return
statements within this method. Open
return Status::failing(
$this,
[
'message' => 'GET failed: ' . $path,
'headers' => $response->getHeaders(),
Avoid too many return
statements within this method. Open
return Status::failing($this, [ 'message' => 'Error on "' . $test . '": ' . $e->getMessage() ]);
Avoid too many return
statements within this method. Open
return (string)$var;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $projection_type->createEntity($mirrored_values, $projection->getParent());
Avoid too many return
statements within this method. Open
return Status::working($this, [ 'message' => 'Pinging elasticsearch succeeded.' ]);
Avoid too many return
statements within this method. Open
return json_encode($obj);
Avoid too many return
statements within this method. Open
return Status::failing($this, [ 'message' => 'Error on "' . $path . '": ' . $e->getMessage() ]);
Avoid too many return
statements within this method. Open
return Status::failing(
$this,
[ 'message' => 'Exception on file path existance check: ' . $e->getMessage() ]
);
Avoid too many return
statements within this method. Open
return Status::working($this, $this->getConnection()->nodes()->stats());
Avoid too many return
statements within this method. Open
return Status::failing($this, [ 'message' => 'Pinging elasticsearch failed.' ]);
Avoid too many return
statements within this method. Open
return 'true';