From 2c3e6a541497d96cdf95bdd12bb6476882063c0e Mon Sep 17 00:00:00 2001 From: Alexis Lefebvre Date: Mon, 6 Dec 2021 17:33:22 +0100 Subject: [PATCH] PlantUmlDumper: use str_starts_with() instead of substr() --- src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php b/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php index 1b9b5f522bed2..f6b2536372019 100644 --- a/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php +++ b/src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php @@ -237,7 +237,7 @@ private function getTransitionEscapedWithStyle(MetadataStoreInterface $workflowM private function getTransitionColor(string $color): string { // PUML format requires that color in transition have to be prefixed with “#”. - if ('#' !== substr($color, 0, 1)) { + if (!str_starts_with($color, '#')) { $color = '#'.$color; }