| 1 | <?php |
||
| 11 | class NewsItemDbRepository extends DbRepository implements NewsItemRepository |
||
| 12 | { |
||
| 13 | public function getAll() : Collection |
||
| 20 | |||
| 21 | public function getLatest(int $amount) : Collection |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return \App\Models\NewsItem|null |
||
| 32 | */ |
||
| 33 | public function findNext(NewsItem $newsItem) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return \App\Models\NewsItem|null |
||
| 44 | */ |
||
| 45 | public function findPrevious(NewsItem $newsItem) |
||
| 53 | |||
| 54 | public function paginate(int $perPage) : Paginator |
||
| 60 | } |
||
| 61 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.