Conditions | 4 |
Paths | 5 |
Total Lines | 30 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function getProfiles(string $customProfileClass = null, $response): Collection |
||
|
|||
24 | { |
||
25 | $profiles = collect(); |
||
26 | |||
27 | if ($customProfileClass) { |
||
28 | $profiles->push(ProfileFactory::create($customProfileClass)); |
||
29 | |||
30 | return $profiles; |
||
31 | } |
||
32 | |||
33 | $profileClass = config('csp.profile'); |
||
34 | |||
35 | if (!empty($profileClass)) { |
||
36 | |||
37 | $profiles->push(ProfileFactory::create($profileClass)); |
||
38 | |||
39 | } |
||
40 | |||
41 | $reportOnlyProfileClass = config('csp.report_only_profile'); |
||
42 | |||
43 | if (!empty($reportOnlyProfileClass)) { |
||
44 | $profile = ProfileFactory::create($reportOnlyProfileClass); |
||
45 | |||
46 | $profile->reportOnly(); |
||
47 | |||
48 | $profiles->push($profile); |
||
49 | } |
||
50 | |||
51 | return $profiles; |
||
52 | } |
||
53 | } |
||
54 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.