Showing 178 of 178 total issues
Avoid too many return
statements within this method. Open
return 'null';
Avoid too many return
statements within this method. Open
return new BulkMetadata($metadata['_type'], $metadata['_identifier'], $metadata['_command']);
Function getScopeKey
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getScopeKey()
{
$parent_attribute = $this->getType()->getParentAttribute();
$scope_key_pieces = [];
- 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 readAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function readAll(SettingsInterface $settings = null)
{
$settings = $settings ?: new Settings;
$data = [];
- 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 handleEmbeddedEntityEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function handleEmbeddedEntityEvents(EntityInterface $projection, EmbeddedEntityEventList $events)
{
foreach ($events as $event) {
if ($event instanceof EmbeddedEntityAddedEvent) {
$this->onEmbeddedEntityAdded($projection, $event);
- 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 processEmbeddedEntityCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function processEmbeddedEntityCommand(CommandInterface $command, array $custom_event_state = [])
{
$event_class = $command->getEventClass();
$attribute_name = $command->getParentAttributeName();
- 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 readAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function readAll(SettingsInterface $settings = null)
{
$settings = $settings ?: new Settings;
$data = [];
- 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 mapResultData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function mapResultData(array $result_data)
{
$results = [];
$hits = $result_data['hits'];
foreach ($hits['hits'] as $hit) {
- 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 getIndexSettings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getIndexSettings(MigrationTarget $migration_target, $include_type_mapping = false)
{
$settings_json_file = $this->getIndexSettingsPath($migration_target);
if (empty($settings_json_file)) {
- 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 excludeAttributes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function excludeAttributes(array &$array)
{
foreach (self::$excluded_attributes as $excluded_attribute) {
if (array_key_exists($excluded_attribute, $array)) {
unset($array[$excluded_attribute]);
- 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 readAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function readAll(SettingsInterface $settings = null)
{
$settings = $settings ?: new Settings;
$data = [];
- 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 moveTempFileToFinalLocation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function moveTempFileToFinalLocation($location, EntityTypeInterface $art)
{
$from_uri = $this->filesystem_service->createTempUri($location, $art); // from temporary storage
$to_uri = $this->filesystem_service->createUri($location, $art); // to final storage
- 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 getDirection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getDirection($target_name, $target_version = null)
{
$migration_target = $this->getMigrationTarget($target_name);
$latest_structure_version = $migration_target->getLatestStructureVersion();
- 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 updateAffectedRelatives
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function updateAffectedRelatives(
ProjectionMap $affected_relatives_map,
ProjectionInterface $source_projection
) {
$referenced_identifier = $source_projection->getIdentifier();
- 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 onEmbeddedEntityModified
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function onEmbeddedEntityModified(EntityInterface $projection, EmbeddedEntityModifiedEvent $event)
{
$embedded_projection_attr = $projection->getType()->getAttribute($event->getParentAttributeName());
$embedded_projection_type = $this->getEmbeddedEntityType($projection, $event);
- 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 sanitizeAttributeValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function sanitizeAttributeValue(AttributeInterface $attribute, $value)
{
$errors = [];
$sanitized_value = null;
- 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 filterEmptyValues
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function filterEmptyValues(array $array, callable $callback = null, $recursive = true)
{
$filtered = [];
foreach ($array as $prop => $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 mirrorReferencedProjection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function mirrorReferencedProjection(EntityReferenceInterface $projection)
{
$projection_type = $projection->getType();
$mirrored_attribute_map = $projection_type->getAttributes()->filter(
function (AttributeInterface $attribute) {
- 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"