Conditions | 4 |
Paths | 10 |
Total Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | protected function execute(InputInterface $input, OutputInterface $output) |
||
27 | { |
||
28 | $config = []; |
||
29 | $options = []; |
||
30 | |||
31 | $output->writeln('Path: '.$this->getPath()); |
||
32 | |||
33 | if ($input->getOption('drafts')) { |
||
34 | $options['drafts'] = true; |
||
35 | $messageOpt .= ' with drafts'; |
||
|
|||
36 | } |
||
37 | |||
38 | try { |
||
39 | if (!$this->quiet) { |
||
40 | $output->writeln(sprintf('Building website%s...', $messageOpt)); |
||
41 | } |
||
42 | $this->getBuilder($output, $config, $options)->build($options); |
||
43 | //if ($this->getRoute()->getName() == 'serve') { |
||
44 | // $this->fs->dumpFile($this->getPath() . '/' . Serve::$tmpDir . '/changes.flag', ''); |
||
45 | //} |
||
46 | } catch (\Exception $e) { |
||
47 | throw new \Exception(sprintf('%s', $e->getMessage())); |
||
48 | } |
||
49 | |||
50 | return 0; |
||
51 | } |
||
52 | } |
||
53 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.