Conditions | 2 |
Paths | 2 |
Total Lines | 30 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function __construct(array $response) |
||
13 | { |
||
14 | $this->response = $response; |
||
15 | |||
16 | $options = new OptionsResolver(); |
||
17 | $options->setDefaults([ |
||
18 | 'categories' => [ |
||
19 | 'performance' => [ |
||
20 | 'score' => null, |
||
21 | ], |
||
22 | 'accessibility' => [ |
||
23 | 'score' => null, |
||
24 | ], |
||
25 | 'best-practices' => [ |
||
26 | 'score' => null, |
||
27 | ], |
||
28 | 'seo' => [ |
||
29 | 'score' => null, |
||
30 | ], |
||
31 | 'pwa' => [ |
||
32 | 'score' => null, |
||
33 | ], |
||
34 | ], |
||
35 | ]); |
||
36 | |||
37 | foreach (array_keys($response) as $key){ |
||
38 | $options->setDefault($key, null); |
||
39 | } |
||
40 | |||
41 | $this->response = $options->resolve($response); |
||
42 | } |
||
125 |