Skip to content

Commit cda10e1

Browse files
committed
typo
1 parent a0d4949 commit cda10e1

1 file changed

Lines changed: 36 additions & 41 deletions

File tree

packages/workflow.md

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -386,47 +386,42 @@ Workflow's graph can be rendered as a Mermaid flowchart for visualization. Each
386386

387387
Generate a Mermaid flowchart using `Mermaid::generate()`:
388388

389-
<details>
390-
<summary>Workflow</summary>
391-
392-
```php
393-
workflow(
394-
ja: async(
395-
fn (): int => 1
396-
),
397-
jb: async(
398-
fn (): int => 2
399-
)
400-
->withRunIf(response('ja'))
401-
->withRunIfNot(variable('var')),
402-
j1: async(
403-
#[_return(new _arrayp(
404-
id: new _int(),
405-
name: new _string()
406-
))]
407-
fn (): array => [
408-
'id' => 123,
409-
'name' => 'example',
410-
]
411-
),
412-
j2: sync(
413-
fn (int $n, string $m): int => $n + $m,
414-
n: response('j1', 'id'),
415-
m: response('j1', 'name')
416-
),
417-
j3: sync(
418-
fn (int $a): int => $a,
419-
a: response('jb')
420-
),
421-
j4: sync(
422-
fn (int $i, int $j): int => $i * $j,
423-
i: response('j2'),
424-
j: response('j3')
425-
),
426-
);
427-
```
428-
429-
</details>
389+
```php
390+
workflow(
391+
ja: async(
392+
fn (): int => 1
393+
),
394+
jb: async(
395+
fn (): int => 2
396+
)
397+
->withRunIf(response('ja'))
398+
->withRunIfNot(variable('var')),
399+
j1: async(
400+
#[_return(new _arrayp(
401+
id: new _int(),
402+
name: new _string()
403+
))]
404+
fn (): array => [
405+
'id' => 123,
406+
'name' => 'example',
407+
]
408+
),
409+
j2: sync(
410+
fn (int $n, string $m): int => $n + $m,
411+
n: response('j1', 'id'),
412+
m: response('j1', 'name')
413+
),
414+
j3: sync(
415+
fn (int $a): int => $a,
416+
a: response('jb')
417+
),
418+
j4: sync(
419+
fn (int $i, int $j): int => $i * $j,
420+
i: response('j2'),
421+
j: response('j3')
422+
),
423+
);
424+
```
430425

431426
```php
432427
$mermaid = Mermaid::generate($workflow);

0 commit comments

Comments
 (0)