Skip to content

Commit

Permalink
Correct errors in README code examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crell committed Aug 28, 2023
1 parent af3fd05 commit 88d6f34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class MainAttrib implements HasSubAttributes
return [Age::class => 'fromAge'];
}

public function fromAge(?ClassSubAttribute $sub): void
public function fromAge(?Age $sub): void
{
$this->age = $sub?->age ?? 0;
}
Expand Down Expand Up @@ -301,7 +301,7 @@ class MainAttrib implements HasSubAttributes
}

#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
class Knows
class Knows implements Multivalue
{
public function __construct(public readonly string $name) {}
}
Expand Down

0 comments on commit 88d6f34

Please sign in to comment.