This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /* |
||
3 | |-------------------------------------------------------------------------- |
||
4 | | Prettus Repository Config |
||
5 | |-------------------------------------------------------------------------- |
||
6 | | |
||
7 | | |
||
8 | */ |
||
9 | return [ |
||
10 | |||
11 | /* |
||
12 | |-------------------------------------------------------------------------- |
||
13 | | Repository Pagination Limit Default |
||
14 | |-------------------------------------------------------------------------- |
||
15 | | |
||
16 | */ |
||
17 | 'pagination' => [ |
||
18 | 'limit' => 15, |
||
19 | ], |
||
20 | |||
21 | /* |
||
22 | |-------------------------------------------------------------------------- |
||
23 | | Fractal Presenter Config |
||
24 | |-------------------------------------------------------------------------- |
||
25 | | |
||
26 | |||
27 | Available serializers: |
||
28 | ArraySerializer |
||
29 | DataArraySerializer |
||
30 | JsonApiSerializer |
||
31 | |||
32 | */ |
||
33 | 'fractal' => [ |
||
34 | 'params' => [ |
||
35 | 'include' => 'include', |
||
36 | ], |
||
37 | 'serializer' => League\Fractal\Serializer\DataArraySerializer::class, |
||
38 | ], |
||
39 | |||
40 | /* |
||
41 | |-------------------------------------------------------------------------- |
||
42 | | Cache Config |
||
43 | |-------------------------------------------------------------------------- |
||
44 | | |
||
45 | */ |
||
46 | 'cache' => [ |
||
47 | /* |
||
48 | |-------------------------------------------------------------------------- |
||
49 | | Cache Status |
||
50 | |-------------------------------------------------------------------------- |
||
51 | | |
||
52 | | Enable or disable cache |
||
53 | | |
||
54 | */ |
||
55 | 'enabled' => true, |
||
56 | |||
57 | /* |
||
58 | |-------------------------------------------------------------------------- |
||
59 | | Cache Minutes |
||
60 | |-------------------------------------------------------------------------- |
||
61 | | |
||
62 | | Time of expiration cache |
||
63 | | |
||
64 | */ |
||
65 | 'minutes' => 30, |
||
66 | |||
67 | /* |
||
68 | |-------------------------------------------------------------------------- |
||
69 | | Cache Repository |
||
70 | |-------------------------------------------------------------------------- |
||
71 | | |
||
72 | | Instance of Illuminate\Contracts\Cache\Repository |
||
73 | | |
||
74 | */ |
||
75 | 'repository' => 'cache', |
||
76 | |||
77 | /* |
||
78 | |-------------------------------------------------------------------------- |
||
79 | | Cache Clean Listener |
||
80 | |-------------------------------------------------------------------------- |
||
81 | | |
||
82 | | |
||
83 | | |
||
84 | */ |
||
85 | 'clean' => [ |
||
86 | |||
87 | /* |
||
88 | |-------------------------------------------------------------------------- |
||
89 | | Enable clear cache on repository changes |
||
90 | |-------------------------------------------------------------------------- |
||
91 | | |
||
92 | */ |
||
93 | 'enabled' => true, |
||
94 | |||
95 | /* |
||
96 | |-------------------------------------------------------------------------- |
||
97 | | Actions in Repository |
||
98 | |-------------------------------------------------------------------------- |
||
99 | | |
||
100 | | create : Clear Cache on create Entry in repository |
||
101 | | update : Clear Cache on update Entry in repository |
||
102 | | delete : Clear Cache on delete Entry in repository |
||
103 | | |
||
104 | */ |
||
105 | 'on' => [ |
||
106 | 'create' => true, |
||
107 | 'update' => true, |
||
108 | 'delete' => true, |
||
109 | ], |
||
110 | ], |
||
111 | |||
112 | 'params' => [ |
||
113 | /* |
||
114 | |-------------------------------------------------------------------------- |
||
115 | | Skip Cache Params |
||
116 | |-------------------------------------------------------------------------- |
||
117 | | |
||
118 | | |
||
119 | | Ex: http://prettus.local/?search=lorem&skipCache=true |
||
120 | | |
||
121 | */ |
||
122 | 'skipCache' => 'skipCache', |
||
123 | ], |
||
124 | |||
125 | /* |
||
0 ignored issues
–
show
|
|||
126 | |-------------------------------------------------------------------------- |
||
127 | | Methods Allowed |
||
128 | |-------------------------------------------------------------------------- |
||
129 | | |
||
130 | | methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria |
||
131 | | |
||
132 | | Ex: |
||
133 | | |
||
134 | | 'only' =>['all','paginate'], |
||
135 | | |
||
136 | | or |
||
137 | | |
||
138 | | 'except' =>['find'], |
||
139 | */ |
||
140 | 'allowed' => [ |
||
141 | 'only' => null, |
||
142 | 'except' => null, |
||
143 | ], |
||
144 | ], |
||
145 | |||
146 | /* |
||
147 | |-------------------------------------------------------------------------- |
||
148 | | Criteria Config |
||
149 | |-------------------------------------------------------------------------- |
||
150 | | |
||
151 | | Settings of request parameters names that will be used by Criteria |
||
152 | | |
||
153 | */ |
||
154 | 'criteria' => [ |
||
155 | /* |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
49% of this comment could be valid code. Did you maybe forget this after debugging?
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. ![]() |
|||
156 | |-------------------------------------------------------------------------- |
||
157 | | Accepted Conditions |
||
158 | |-------------------------------------------------------------------------- |
||
159 | | |
||
160 | | Conditions accepted in consultations where the Criteria |
||
161 | | |
||
162 | | Ex: |
||
163 | | |
||
164 | | 'acceptedConditions'=>['=','like'] |
||
165 | | |
||
166 | | $query->where('foo','=','bar') |
||
167 | | $query->where('foo','like','bar') |
||
168 | | |
||
169 | */ |
||
170 | 'acceptedConditions' => [ |
||
171 | '=', |
||
172 | 'like', |
||
173 | ], |
||
174 | /* |
||
175 | |-------------------------------------------------------------------------- |
||
176 | | Request Params |
||
177 | |-------------------------------------------------------------------------- |
||
178 | | |
||
179 | | Request parameters that will be used to filter the query in the repository |
||
180 | | |
||
181 | | Params : |
||
182 | | |
||
183 | | - search : Searched value |
||
184 | | Ex: http://prettus.local/?search=lorem |
||
185 | | |
||
186 | | - searchFields : Fields in which research should be carried out |
||
187 | | Ex: |
||
188 | | http://prettus.local/?search=lorem&searchFields=name;email |
||
189 | | http://prettus.local/?search=lorem&searchFields=name:like;email |
||
190 | | http://prettus.local/?search=lorem&searchFields=name:like |
||
191 | | |
||
192 | | - filter : Fields that must be returned to the response object |
||
193 | | Ex: |
||
194 | | http://prettus.local/?search=lorem&filter=id,name |
||
195 | | |
||
196 | | - orderBy : Order By |
||
197 | | Ex: |
||
198 | | http://prettus.local/?search=lorem&orderBy=id |
||
199 | | |
||
200 | | - sortedBy : Sort |
||
201 | | Ex: |
||
202 | | http://prettus.local/?search=lorem&orderBy=id&sortedBy=asc |
||
203 | | http://prettus.local/?search=lorem&orderBy=id&sortedBy=desc |
||
204 | | |
||
205 | */ |
||
206 | 'params' => [ |
||
207 | 'search' => 'search', |
||
208 | 'searchFields' => 'searchFields', |
||
209 | 'filter' => 'filter', |
||
210 | 'orderBy' => 'orderBy', |
||
211 | 'sortedBy' => 'sortedBy', |
||
212 | 'with' => 'with', |
||
213 | ], |
||
214 | ], |
||
215 | /* |
||
216 | |-------------------------------------------------------------------------- |
||
217 | | Generator Config |
||
218 | |-------------------------------------------------------------------------- |
||
219 | | |
||
220 | */ |
||
221 | 'generator' => [ |
||
222 | 'basePath' => app()->path(), |
||
223 | 'rootNamespace' => 'App\\', |
||
224 | 'paths' => [ |
||
225 | 'models' => 'Models', |
||
226 | 'repositories' => 'Repositories\Eloquent', |
||
227 | 'interfaces' => 'Repositories\Interfaces', |
||
228 | 'transformers' => 'Transformers', |
||
229 | 'presenters' => 'Presenters', |
||
230 | 'validators' => 'Validators', |
||
231 | 'controllers' => 'Api\Controllers\V1', |
||
232 | 'provider' => 'RepositoryServiceProvider', |
||
233 | 'criteria' => 'Repositories\Criteria', |
||
234 | 'stubsOverridePath' => app()->path(), |
||
235 | ], |
||
236 | ], |
||
237 | ]; |
||
238 |
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.