Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d320dfa

Browse filesBrowse files
remove DumperHelperTrait
1 parent e54ceec commit d320dfa
Copy full SHA for d320dfa

File tree

3 files changed

+4
-37
lines changed
Filter options

3 files changed

+4
-37
lines changed

‎src/Symfony/Component/Workflow/Dumper/DumperHelperTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/Dumper/DumperHelperTrait.php
-28Lines changed: 0 additions & 28 deletions
This file was deleted.

‎src/Symfony/Component/Workflow/Dumper/MermaidDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/Dumper/MermaidDumper.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
class MermaidDumper implements DumperInterface
1919
{
20-
use DumperHelperTrait;
21-
2220
public const DIRECTION_TOP_TO_BOTTOM = 'TB';
2321
public const DIRECTION_TOP_DOWN = 'TD';
2422
public const DIRECTION_BOTTOM_TO_TOP = 'BT';
@@ -226,7 +224,7 @@ private function styleStatemachineTransition(
226224
string $transitionLabel,
227225
array $transitionMeta
228226
): array {
229-
$transitionOutput = [sprintf('%s-->|%s|%s', $from, self::sanitize($this->escape($transitionLabel)), $to)];
227+
$transitionOutput = [sprintf('%s-->|%s|%s', $from, str_replace("\n", ' ', $this->escape($transitionLabel)), $to)];
230228

231229
$linkStyle = $this->styleLink($transitionMeta);
232230
if ('' !== $linkStyle) {

‎src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/Dumper/PlantUmlDumper.php
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
*/
2828
class PlantUmlDumper implements DumperInterface
2929
{
30-
use DumperHelperTrait;
31-
3230
private const INITIAL = '<<initial>>';
3331
private const MARKED = '<<marked>>';
3432

@@ -197,8 +195,7 @@ private function getState(string $place, Definition $definition, Marking $markin
197195
{
198196
$workflowMetadata = $definition->getMetadataStore();
199197

200-
$placeEscaped = $this->escape($place);
201-
$placeEscaped = self::sanitize($placeEscaped);
198+
$placeEscaped = str_replace("\n", ' ', $this->escape($place));
202199

203200
$output = "state $placeEscaped".
204201
(\in_array($place, $definition->getInitialPlaces(), true) ? ' '.self::INITIAL : '').
@@ -211,7 +208,7 @@ private function getState(string $place, Definition $definition, Marking $markin
211208

212209
$description = $workflowMetadata->getMetadata('description', $place);
213210
if (null !== $description) {
214-
$output .= \PHP_EOL.$placeEscaped.' : '.self::sanitize($description);
211+
$output .= \PHP_EOL.$placeEscaped.' : '.str_replace("\n", ' ', $description);
215212
}
216213

217214
return $output;
@@ -220,7 +217,7 @@ private function getState(string $place, Definition $definition, Marking $markin
220217
private function getTransitionEscapedWithStyle(MetadataStoreInterface $workflowMetadata, Transition $transition, string $to): string
221218
{
222219
$to = $workflowMetadata->getMetadata('label', $transition) ?? $to;
223-
$to = self::sanitize($to);
220+
$to = str_replace("\n", ' ', $to);
224221

225222
$color = $workflowMetadata->getMetadata('color', $transition) ?? null;
226223

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.