Skip to content

Commit b052d81

Browse files
committed
Fix: Update README.md
1 parent e3bac43 commit b052d81

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![Latest Stable Version](https://poser.pugx.org/ergebnis/classy/v/stable)](https://packagist.org/packages/ergebnis/classy)
1212
[![Total Downloads](https://poser.pugx.org/ergebnis/classy/downloads)](https://packagist.org/packages/ergebnis/classy)
1313

14-
Provides a finder for classy constructs (classes, interfaces, and traits).
14+
Provides a finder for classy constructs (classes, enums, interfaces, and traits).
1515

1616
## Installation
1717

@@ -40,19 +40,20 @@ namespace Example;
4040

4141
class Foo {}
4242

43-
interface Bar {}
43+
enum Bar {}
4444

45-
trait Baz {}
45+
interface Baz {}
46+
47+
trait Qux {}
4648
PHP;
4749

48-
/** @var Construct[] $constructs */
4950
$constructs = Constructs::fromSource($source);
5051

5152
$names = array_map(static function (Construct $construct): string {
5253
return $construct->name();
5354
}, $constructs);
5455

55-
var_dump($names); // ['Example\Bar', 'Example\Baz', 'Example\Foo']
56+
var_dump($names); // ['Example\Bar', 'Example\Baz', 'Example\Foo', 'Example\Qux']
5657
```
5758

5859
### Collect classy constructs from a directory
@@ -65,7 +66,6 @@ Use `Constructs::fromDirectory()` to collect classy constructs in a directory:
6566
use Ergebnis\Classy\Construct;
6667
use Ergebnis\Classy\Constructs;
6768

68-
/** @var Construct[] $constructs */
6969
$constructs = Constructs::fromDirectory(__DIR__ . '/example');
7070

7171
$names = array_map(static function (Construct $construct): string {

0 commit comments

Comments
 (0)