1 | <?php |
||
14 | class ModelConfig implements Arrayable, Jsonable, JsonSerializable |
||
15 | { |
||
16 | use HasAttributesTrait; |
||
17 | |||
18 | /** |
||
19 | * @var \Illuminate\Foundation\Application |
||
20 | */ |
||
21 | protected $app; |
||
22 | |||
23 | /** |
||
24 | * @var \Sco\Admin\Contracts\Config |
||
25 | */ |
||
26 | protected $configFactory; |
||
27 | /** |
||
28 | * @var \Illuminate\Database\Eloquent\Model |
||
29 | */ |
||
30 | //protected $model; |
||
31 | |||
32 | /** |
||
33 | * @var mixed|\Sco\Admin\Repositories\Repository |
||
34 | */ |
||
35 | protected $repository; |
||
36 | |||
37 | protected $config; |
||
38 | |||
39 | public function __construct(Application $app, ConfigContract $factory) |
||
54 | |||
55 | /** |
||
56 | * @return mixed|\Sco\Admin\Repositories\Repository |
||
57 | */ |
||
58 | public function getRepository() |
||
62 | |||
63 | protected function parseRows($rows) |
||
77 | |||
78 | public function get() |
||
94 | |||
95 | public function delete($id) |
||
99 | |||
100 | protected function usePagination() |
||
104 | |||
105 | protected function getConfigValues() |
||
119 | |||
120 | /** |
||
121 | * Handle dynamic method calls into the model. |
||
122 | * |
||
123 | * @param string $method |
||
124 | * @param array $parameters |
||
125 | * @return mixed |
||
126 | */ |
||
127 | /*public function __call($method, $parameters) |
||
128 | { |
||
129 | if (in_array($method, ['getKeyName'])) { |
||
130 | return $this->model->$method(...$parameters); |
||
131 | } |
||
132 | |||
133 | $this->model = $this->model->$method(...$parameters); |
||
134 | return $this; |
||
135 | }*/ |
||
136 | |||
137 | /** |
||
138 | * Handle dynamic static method calls into the method. |
||
139 | * |
||
140 | * @param string $method |
||
141 | * @param array $parameters |
||
142 | * @return mixed |
||
143 | */ |
||
144 | /*public static function __callStatic($method, $parameters) |
||
145 | { |
||
146 | return (new static)->$method(...$parameters); |
||
147 | }*/ |
||
148 | } |
||
149 |
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.