1 | <?php |
||
30 | final class VisibilityScope implements ScopeInterface |
||
31 | { |
||
32 | // The item is visible to anyone |
||
33 | const VISIBILITY_PUBLIC = 0; |
||
34 | // The item is only visible to its owner and other logged in users |
||
35 | const VISIBILITY_LOGGED_IN = 1; |
||
36 | // The item is only visible to its owner |
||
37 | const VISIBILITY_PRIVATE = 2; |
||
38 | private $tableName; |
||
39 | |||
40 | /** |
||
41 | * Apply the scopes for model. |
||
42 | * |
||
43 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
44 | * @param \Illuminate\Database\Eloquent\Model $model |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function apply(Builder $builder, Model $model) |
||
58 | |||
59 | /** |
||
60 | * Apply public scope. |
||
61 | * |
||
62 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
63 | * |
||
64 | * @return \Illuminate\Database\Eloquent\Builder |
||
65 | */ |
||
66 | public function applyPublicScope(Builder $query) |
||
70 | |||
71 | /** |
||
72 | * Apply logged in scope. |
||
73 | * |
||
74 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
75 | * @param \Gitamin\Models\User $user |
||
76 | * |
||
77 | * @return \Illuminate\Database\Eloquent\Builder |
||
78 | */ |
||
79 | public function applyLoggedInScope(Builder $query, User $user) |
||
93 | |||
94 | /** |
||
95 | * Remove the scopes for model. |
||
96 | * |
||
97 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
98 | * @param \Illuminate\Database\Eloquent\Model $model |
||
99 | * |
||
100 | * @return void |
||
101 | */ |
||
102 | public function remove(Builder $builder, Model $model) |
||
106 | } |
||
107 |
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@property
annotation 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.