Skip to content

Commit 3f5435d

Browse files
committed
chore: Update linter artifacts
1 parent 651a055 commit 3f5435d

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

lib/EventListener/OpenRegisterEventsDebugListener.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,12 @@ private function extractEventData(Event $event): array
358358
'organisationTitle' => $organisation->getName(),
359359
]
360360
);
361-
// Unknown event type.
362-
} else {
361+
}//end if
362+
363+
if (isset($data['eventType']) === false) {
363364
$data['eventType'] = 'Unknown';
364365
$data['note'] = 'Event type not specifically handled by SoftwareCatalog debug listener';
365-
}//end if
366+
}
366367

367368
return $data;
368369

lib/EventListener/SoftwareCatalogEventListener.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ private function handleObjectUpdated(
464464
]
465465
);
466466
}//end try
467-
} else {
467+
}//end if
468+
469+
if (in_array(needle: $status, haystack: ['actief', 'active']) !== true || $status === $oldStatus) {
468470
$logger->debug(
469471
'SoftwareCatalog: Skipping non-active organization update',
470472
[
@@ -473,7 +475,7 @@ private function handleObjectUpdated(
473475
'schemaId' => $objectSchemaId,
474476
]
475477
);
476-
}//end if
478+
}
477479

478480
return;
479481
}//end if

lib/Service/ProgressTracker.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,11 @@ private function calculateOverallPercentage(): int
361361
if ($currentPhaseIndex !== false) {
362362
$currentPhaseWeight = self::PHASES[$this->progress['phase']]['weight'];
363363

364+
// If no items to process, consider phase as complete.
365+
$currentPhaseProgress = $currentPhaseWeight;
364366
if ($this->progress['total_items'] > 0) {
365367
$itemRatio = $this->progress['processed_items'] / $this->progress['total_items'];
366368
$currentPhaseProgress = $itemRatio * $currentPhaseWeight;
367-
} else {
368-
// If no items to process, consider phase as complete.
369-
$currentPhaseProgress = $currentPhaseWeight;
370369
}
371370
}
372371

0 commit comments

Comments
 (0)