1 | <?php |
||
7 | class SubCategoriesRepository extends Repository |
||
8 | { |
||
9 | /** |
||
10 | * @return SubCategory |
||
11 | */ |
||
12 | public function getModel() |
||
16 | |||
17 | /** |
||
18 | * Get row by translated slug. |
||
19 | * |
||
20 | * @param $slug |
||
21 | * @return mixed |
||
22 | */ |
||
23 | public function findBySlug($slug) |
||
31 | |||
32 | public function getSubCategory($category_id) |
||
40 | } |
If you implement
__call
and 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
__call
is implemented by a parent class and only the child class knows which methods exist: