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,
|
private readonly DuplicateEntityWorkflowFinder $duplicateEntityWorkflowFinder,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return list<array{name: string, text: string}>
|
||||||
|
*/
|
||||||
public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array
|
public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array
|
||||||
{
|
{
|
||||||
$blankEntityWorkflow = new EntityWorkflow();
|
$blankEntityWorkflow = new EntityWorkflow();
|
||||||
@ -56,6 +59,9 @@ class MetadataExtractor
|
|||||||
return $workflowsList;
|
return $workflowsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array{name: string, text: string}
|
||||||
|
*/
|
||||||
public function buildArrayPresentationForPlace(EntityWorkflow $entityWorkflow, ?EntityWorkflowStep $step = null): array
|
public function buildArrayPresentationForPlace(EntityWorkflow $entityWorkflow, ?EntityWorkflowStep $step = null): array
|
||||||
{
|
{
|
||||||
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
||||||
@ -69,6 +75,9 @@ class MetadataExtractor
|
|||||||
return ['name' => $step->getCurrentStep(), 'text' => $text];
|
return ['name' => $step->getCurrentStep(), 'text' => $text];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array{name?: string, text?: string, isForward?: bool}
|
||||||
|
*/
|
||||||
public function buildArrayPresentationForTransition(EntityWorkflow $entityWorkflow, string $transitionName): array
|
public function buildArrayPresentationForTransition(EntityWorkflow $entityWorkflow, string $transitionName): array
|
||||||
{
|
{
|
||||||
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
$workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName());
|
||||||
@ -90,6 +99,9 @@ class MetadataExtractor
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array{name: string, text: string}
|
||||||
|
*/
|
||||||
public function buildArrayPresentationForWorkflow(WorkflowInterface $workflow): array
|
public function buildArrayPresentationForWorkflow(WorkflowInterface $workflow): array
|
||||||
{
|
{
|
||||||
$metadata = $workflow->getMetadataStore()->getWorkflowMetadata();
|
$metadata = $workflow->getMetadataStore()->getWorkflowMetadata();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user