diff --git a/README.md b/README.md index 6894a065..0a0a2d0b 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,20 @@ namespace Example; class Foo {} -interface Bar {} +enum Bar {} -trait Baz {} +interface Baz {} + +trait Qux {} PHP; -/** @var Construct[] $constructs */ $constructs = Constructs::fromSource($source); $names = array_map(static function (Construct $construct): string { return $construct->name(); }, $constructs); -var_dump($names); // ['Example\Bar', 'Example\Baz', 'Example\Foo'] +var_dump($names); // ['Example\Bar', 'Example\Baz', 'Example\Foo', 'Example\Qux'] ``` ### Collect classy constructs from a directory @@ -65,7 +66,6 @@ Use `Constructs::fromDirectory()` to collect classy constructs in a directory: use Ergebnis\Classy\Construct; use Ergebnis\Classy\Constructs; -/** @var Construct[] $constructs */ $constructs = Constructs::fromDirectory(__DIR__ . '/example'); $names = array_map(static function (Construct $construct): string {