apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -16,7 +16,6 @@ use Chill\MainBundle\Entity\Workflow\EntityWorkflowStep;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Symfony\Component\Workflow\Registry;
use Symfony\Component\Workflow\WorkflowInterface;
use function array_key_exists;
class MetadataExtractor
{
@@ -35,7 +34,7 @@ class MetadataExtractor
foreach ($workflows as $workflow) {
$metadata = $workflow->getMetadataStore()->getWorkflowMetadata();
$text = array_key_exists('label', $metadata) ?
$text = \array_key_exists('label', $metadata) ?
$this->translatableStringHelper->localize($metadata['label']) : $workflow->getName();
$workflowsList[] = ['name' => $workflow->getName(), 'text' => $text];
@@ -44,14 +43,14 @@ class MetadataExtractor
return $workflowsList;
}
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());
$step ??= $entityWorkflow->getCurrentStep();
$markingMetadata = $workflow->getMetadataStore()->getPlaceMetadata($step->getCurrentStep());
$text = array_key_exists('label', $markingMetadata) ?
$text = \array_key_exists('label', $markingMetadata) ?
$this->translatableStringHelper->localize($markingMetadata['label']) : $step->getCurrentStep();
return ['name' => $step->getCurrentStep(), 'text' => $text];
@@ -68,7 +67,7 @@ class MetadataExtractor
return [
'name' => $transition->getName(),
'text' => array_key_exists('label', $metadata) ?
'text' => \array_key_exists('label', $metadata) ?
$this->translatableStringHelper->localize($metadata['label']) : $transition->getName(),
'isForward' => $metadata['isForward'] ?? null,
];
@@ -81,7 +80,7 @@ class MetadataExtractor
public function buildArrayPresentationForWorkflow(WorkflowInterface $workflow): array
{
$metadata = $workflow->getMetadataStore()->getWorkflowMetadata();
$text = array_key_exists('label', $metadata) ?
$text = \array_key_exists('label', $metadata) ?
$this->translatableStringHelper->localize($metadata['label']) : $workflow->getName();
return ['name' => $workflow->getName(), 'text' => $text];