mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
fix cs
This commit is contained in:
@@ -62,12 +62,8 @@ class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Environment $environment
|
||||
* @param string $relatedEntityClass
|
||||
* @param int $relatedEntityId
|
||||
* @param array $options
|
||||
* @param array{relatedEntityClass: string, relatedEntityId: int} $supplementaryRelated
|
||||
* @return string
|
||||
*
|
||||
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface
|
||||
* @throws \Twig\Error\LoaderError
|
||||
* @throws \Twig\Error\RuntimeError
|
||||
@@ -75,10 +71,10 @@ class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
*/
|
||||
public function listWorkflows(Environment $environment, string $relatedEntityClass, int $relatedEntityId, array $options = [], array $supplementaryRelated = []): string
|
||||
{
|
||||
list($blankEntityWorkflow, $workflowsAvailable, $entityWorkflows) = $this->getWorkflowsForRelated($relatedEntityClass, $relatedEntityId);
|
||||
[$blankEntityWorkflow, $workflowsAvailable, $entityWorkflows] = $this->getWorkflowsForRelated($relatedEntityClass, $relatedEntityId);
|
||||
|
||||
foreach ($supplementaryRelated as $supplementary) {
|
||||
list($supplementaryBlankEntityWorkflow, $supplementaryWorkflowsAvailable, $supplementaryEntityWorkflows)
|
||||
[$supplementaryBlankEntityWorkflow, $supplementaryWorkflowsAvailable, $supplementaryEntityWorkflows]
|
||||
= $this->getWorkflowsForRelated($supplementary['relatedEntityClass'], $supplementary['relatedEntityId']);
|
||||
|
||||
$entityWorkflows = array_merge($entityWorkflows, $supplementaryEntityWorkflows);
|
||||
@@ -94,8 +90,6 @@ class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $relatedEntityClass
|
||||
* @param int $relatedEntityId
|
||||
* @return array where keys are: {0: blankWorkflow, 1: entityWorkflows, 2: workflowList}
|
||||
*/
|
||||
private function getWorkflowsForRelated(string $relatedEntityClass, int $relatedEntityId): array
|
||||
@@ -112,7 +106,8 @@ class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
$blankEntityWorkflow,
|
||||
$workflowsList,
|
||||
$this->repository->findBy(
|
||||
['relatedEntityClass' => $relatedEntityClass, 'relatedEntityId' => $relatedEntityId]),
|
||||
['relatedEntityClass' => $relatedEntityClass, 'relatedEntityId' => $relatedEntityId]
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user