Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function checkRunningAsRootUser(Event $event) |
||
39 | { |
||
40 | if ($this->_isSkipRootCheck($event->getInput())) { |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | $config = $event->getApplication()->getConfig(); |
||
45 | if (!$config['application']['check-root-user']) { |
||
46 | return; |
||
47 | } |
||
48 | |||
49 | if (OperatingSystem::isRoot()) { |
||
50 | $output = $event->getOutput(); |
||
51 | $output->writeln(array( |
||
52 | '', |
||
53 | self::WARNING_ROOT_USER, |
||
54 | '', |
||
55 | )); |
||
56 | } |
||
57 | } |
||
58 | |||
67 |