1 | <?php |
||
18 | class SoftDeletingScope implements Scope |
||
19 | { |
||
20 | /** |
||
21 | * All of the extensions to be added to the builder. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $extensions = ['ForceDelete', 'Restore', 'WithTrashed', 'OnlyTrashed']; |
||
26 | |||
27 | /** |
||
28 | * Apply the scope to a given Eloquent query builder. |
||
29 | * |
||
30 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
31 | * @param \Illuminate\Database\Eloquent\Model $model |
||
32 | * @return void |
||
33 | */ |
||
34 | public function apply(Builder $builder, Model $model) |
||
38 | |||
39 | /** |
||
40 | * Extend the query builder with the needed functions. |
||
41 | * |
||
42 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
43 | * @return void |
||
44 | */ |
||
45 | public function extend(Builder $builder) |
||
65 | |||
66 | /** |
||
67 | * Get the "deleted at" column for the builder. |
||
68 | * |
||
69 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
70 | * @return string |
||
71 | */ |
||
72 | protected function getDeletedAtColumn(Builder $builder) |
||
80 | |||
81 | /** |
||
82 | * Get the "deleted by" column for the builder. |
||
83 | * |
||
84 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
85 | * @return string |
||
86 | */ |
||
87 | protected function getDeletedByColumn(Builder $builder) |
||
95 | |||
96 | /** |
||
97 | * Add the force delete extension to the builder. |
||
98 | * |
||
99 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
100 | * @return void |
||
101 | */ |
||
102 | protected function addForceDelete(Builder $builder) |
||
108 | |||
109 | /** |
||
110 | * Add the restore extension to the builder. |
||
111 | * |
||
112 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
113 | * @return void |
||
114 | */ |
||
115 | protected function addRestore(Builder $builder) |
||
123 | |||
124 | /** |
||
125 | * Add the with-trashed extension to the builder. |
||
126 | * |
||
127 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
128 | * @return void |
||
129 | */ |
||
130 | protected function addWithTrashed(Builder $builder) |
||
136 | |||
137 | /** |
||
138 | * Add the only-trashed extension to the builder. |
||
139 | * |
||
140 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
141 | * @return void |
||
142 | */ |
||
143 | protected function addOnlyTrashed(Builder $builder) |
||
155 | } |
||
156 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.