1 | <?php |
||
11 | abstract class AbstractAudit |
||
12 | { |
||
13 | use CanRetrieveInputValues; |
||
14 | |||
15 | /** |
||
16 | * Process builder object. |
||
17 | * |
||
18 | * @var ProcessBuilder |
||
19 | */ |
||
20 | protected $processBuilder; |
||
21 | |||
22 | /** |
||
23 | * Console output interface. |
||
24 | * |
||
25 | * @var OutputInterface |
||
26 | */ |
||
27 | protected $output; |
||
28 | |||
29 | /** |
||
30 | * Current filename. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $filename; |
||
35 | |||
36 | /** |
||
37 | * Current url. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $url; |
||
42 | |||
43 | /** |
||
44 | * AbstractProcess constructor. |
||
45 | * |
||
46 | * @param ProcessBuilder $processBuilder |
||
47 | * @param InputInterface $input |
||
48 | * @param OutputInterface $output |
||
49 | * @param string $filename |
||
50 | */ |
||
51 | public function __construct(ProcessBuilder $processBuilder, InputInterface $input, OutputInterface $output, string $filename) |
||
60 | |||
61 | /** |
||
62 | * Generate command for the current process. |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | protected function generateCommand() :array |
||
76 | |||
77 | /** |
||
78 | * Get the command options. |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | protected function getCommandOptions() :array |
||
94 | |||
95 | /** |
||
96 | * Get the default chrome flags. |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | protected function getDefaultChromeFlags() :array |
||
110 | |||
111 | /** |
||
112 | * Run the process. |
||
113 | * |
||
114 | * @throws \Exception |
||
115 | * |
||
116 | * @return bool |
||
117 | */ |
||
118 | public function run() :bool |
||
138 | } |
||
139 |