Skip to content

Commit 16d0497

Browse files
committed
Fix Dictionary::add method
1 parent 238e6e3 commit 16d0497

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Dictionary.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,14 @@ public function last(): array
505505
* This method MUST retain the state of the current instance, and return
506506
* an instance that contains the specified changes.
507507
*
508-
* @param SfMemberInput|null $member
508+
* @param SfMemberInput $member
509509
*
510510
* @throws SyntaxError If the string key is not a valid
511511
*/
512512
public function add(
513513
string $key,
514-
iterable|StructuredFieldProvider|Dictionary|Parameters|Item|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool|null $member
514+
iterable|StructuredFieldProvider|Dictionary|Parameters|Item|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool $member
515515
): self {
516-
if (null === $member) {
517-
return $this;
518-
}
519516
$members = $this->members;
520517
$members[MapKey::from($key)->value] = self::filterMember($member);
521518

0 commit comments

Comments
 (0)