Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Jan 28, 2024
1 parent 2d5b741 commit 0cdf2f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DocBlock/TypeExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function getTypesGlue(): string
*/
public function walkTypes(\Closure $callback): void
{
foreach ($this->innerTypeExpressions as [
foreach (array_reverse($this->innerTypeExpressions) as [
'start_index' => $startIndex,
'expression' => $inner,
]) {
Expand Down
2 changes: 1 addition & 1 deletion tests/DocBlock/TypeExpressionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public function testWalkTypes(): void

$typeExpression->walkTypes($addLeadingSlash);

self::assertSame('\Foo\Bar\Bazaz', $typeExpression->toString());
self::assertSame('\Foo|\Bar|\Baz', $typeExpression->toString());
}

/**
Expand Down

0 comments on commit 0cdf2f4

Please sign in to comment.