1 | <?php |
||
7 | trait CanRetrieveInputValues |
||
8 | { |
||
9 | use SanitizeInput; |
||
10 | |||
11 | /** |
||
12 | * Console input interface. |
||
13 | * |
||
14 | * @var \Symfony\Component\Console\Input\InputInterface |
||
15 | */ |
||
16 | protected $input; |
||
17 | |||
18 | /** |
||
19 | * Get analysis emulation mode. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | protected function getMode() :string |
||
29 | |||
30 | /** |
||
31 | * Get URL prefix from input. |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function getUrlPrefix() :string |
||
41 | |||
42 | /** |
||
43 | * Get the chrome flags. |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | protected function getChromeFlags() :array |
||
56 | |||
57 | /** |
||
58 | * Get minimal performance score. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | protected function getPerformanceScore() :string |
||
68 | |||
69 | /** |
||
70 | * Get minimal best-practices score. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | protected function getBestPracticesScore() :string |
||
80 | |||
81 | /** |
||
82 | * Get minimal accessibility score. |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | protected function getAccessibilityScore() :string |
||
92 | |||
93 | /** |
||
94 | * Get minimal SEO score. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | protected function getSeoScore() :string |
||
104 | |||
105 | /** |
||
106 | * Get minimal PWA score. |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | protected function getPwaScore() :string |
||
116 | |||
117 | /** |
||
118 | * Trim double quotes from input options. |
||
119 | * |
||
120 | * @param string $text |
||
121 | * @return string |
||
122 | */ |
||
123 | protected function trimDoubleQuotes(string $text) :string |
||
129 | |||
130 | |||
131 | /** |
||
132 | * Get the default chrome flags. |
||
133 | * |
||
134 | * @return array |
||
135 | */ |
||
136 | abstract protected function getDefaultChromeFlags() :array; |
||
137 | } |