1 | <?php |
||
11 | abstract class View implements ViewInterface, Arrayable |
||
12 | { |
||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $with = []; |
||
17 | |||
18 | /** |
||
19 | * @var RepositoryInterface |
||
20 | */ |
||
21 | protected $repository; |
||
22 | |||
23 | protected $scopes; |
||
24 | |||
25 | protected $applies; |
||
26 | |||
27 | protected $filters; |
||
28 | |||
29 | protected $type; |
||
30 | |||
31 | protected $extensions; |
||
32 | |||
33 | public function __construct() |
||
39 | |||
40 | public function initialize() |
||
44 | |||
45 | /** |
||
46 | * @return \Illuminate\Support\Collection |
||
47 | */ |
||
48 | public function getFilters(): Collection |
||
52 | |||
53 | /** |
||
54 | * @param mixed $filters |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setFilters($filters) |
||
67 | |||
68 | public function addFilter($filter) |
||
72 | |||
73 | /** |
||
74 | * @return \Illuminate\Support\Collection |
||
75 | */ |
||
76 | public function getScopes(): Collection |
||
80 | |||
81 | /** |
||
82 | * @param mixed $scopes |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function setScopes($scopes) |
||
95 | |||
96 | |||
97 | public function addScope($scope) |
||
103 | |||
104 | /** |
||
105 | * @return mixed |
||
106 | */ |
||
107 | public function getApplies() |
||
111 | |||
112 | /** |
||
113 | * @param mixed $applies |
||
114 | * |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function setApplies($applies) |
||
126 | |||
127 | public function addApply($apply) |
||
133 | |||
134 | public function setRepository(RepositoryInterface $repository) |
||
141 | |||
142 | public function getRepository() |
||
146 | |||
147 | /** |
||
148 | * @return string[] |
||
149 | */ |
||
150 | public function getWith() |
||
154 | |||
155 | /** |
||
156 | * {@inheritdoc} |
||
157 | */ |
||
158 | public function with($relations) |
||
164 | |||
165 | public function getQuery() |
||
177 | |||
178 | /** |
||
179 | * Add an "order by" clause to the query. |
||
180 | * |
||
181 | * @param string $column |
||
182 | * @param string $direction |
||
183 | * |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function orderBy($column, $direction = 'asc') |
||
194 | |||
195 | public function toArray() |
||
201 | } |
||
202 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.