| 1 | <?php |
||
| 10 | class Builder extends BaseBuilder |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Return results where created_at between now and last month. |
||
| 14 | * |
||
| 15 | * @return \Chriscreates\Blog\Builders\Builder |
||
| 16 | */ |
||
| 17 | public function lastMonth() : Builder |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Return results where created_at between now and last week. |
||
| 26 | * |
||
| 27 | * @return \Chriscreates\Blog\Builders\Builder |
||
| 28 | */ |
||
| 29 | public function lastWeek() : Builder |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Return results where slug matches. |
||
| 38 | * |
||
| 39 | * @param string $status |
||
| 40 | * @return \Chriscreates\Blog\Builders\Builder |
||
| 41 | */ |
||
| 42 | public function slug(string $slug) : Builder |
||
| 53 | } |
||
| 54 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: