mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Set return types to MetadataExtractor
This commit is contained in:
parent
508c4cd674
commit
29fa086fde
@ -25,6 +25,9 @@ class MetadataExtractor
|
||||
private readonly DuplicateEntityWorkflowFinder $duplicateEntityWorkflowFinder,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return list<array{name: string, text: string}>
|
||||
*/
|
||||
public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array
|
||||
{
|
||||
$blankEntityWorkflow = new EntityWorkflow();
|
||||
@ -56,6 +59,9 @@ class MetadataExtractor
|
||||
return $workflowsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{name: string, text: string}
|
||||
*/
|
||||
public function buildArrayPresentationForPlace(EntityWorkflow $entityWorkflow, ?EntityWorkflowStep $step = null): array
|
||||
{
|
||||
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
||||
@ -69,6 +75,9 @@ class MetadataExtractor
|
||||
return ['name' => $step->getCurrentStep(), 'text' => $text];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{name?: string, text?: string, isForward?: bool}
|
||||
*/
|
||||
public function buildArrayPresentationForTransition(EntityWorkflow $entityWorkflow, string $transitionName): array
|
||||
{
|
||||
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
||||
@ -90,6 +99,9 @@ class MetadataExtractor
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{name: string, text: string}
|
||||
*/
|
||||
public function buildArrayPresentationForWorkflow(WorkflowInterface $workflow): array
|
||||
{
|
||||
$metadata = $workflow->getMetadataStore()->getWorkflowMetadata();
|
||||
|
Loading…
x
Reference in New Issue
Block a user