Skip to content

Commit

Permalink
docs: update README examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gskema committed Jun 26, 2023
1 parent 7a0ac36 commit 7aa1300
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class Banana
/** @var class-string */
public string $prop15;

/** @var iterable<int, Acme> */
public iterable $prop16;

public function __construct(
$param1, // missing param type decl. in method PHPDoc
public $param2, // missing param type decl. (in method PHPDoc or inline PHPDoc)
Expand Down Expand Up @@ -189,6 +192,11 @@ class Banana
): array {
return ['foo' => 1];
}

/**
* @return Generator<int, string> // supported
*/
public function func6(): Generator;
}
```

Expand Down

0 comments on commit 7aa1300

Please sign in to comment.