Skip to content

Commit dafd99a

Browse files
committed
Apply PER-2.0 and fix psalm errors
1 parent 2e8e6b7 commit dafd99a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Factory.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ public function __construct(
1818

1919
public function add(array|string $tags, FactoryInterface $delegate): void
2020
{
21-
foreach ((array)$tags as $tag) {
21+
foreach ((array) $tags as $tag) {
2222
$this->factories[$tag] = $delegate;
2323
}
2424
}
2525

2626
public function create(string $name, string $content, DescriptionParserInterface $descriptions): Tag
2727
{
28-
if (($delegate = $this->factories[$name]) !== null) {
28+
$delegate = $this->factories[$name] ?? null;
29+
30+
if ($delegate !== null) {
2931
return $delegate->create($name, $content, $descriptions);
3032
}
3133

src/MutableFactoryInterface.php

+3
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66

77
interface MutableFactoryInterface extends FactoryInterface
88
{
9+
/**
10+
* @param non-empty-string|list<non-empty-string> $tags
11+
*/
912
public function add(string|array $tags, FactoryInterface $delegate): void;
1013
}

0 commit comments

Comments
 (0)