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