1 | <?php |
||
15 | class CheckRootUser implements EventSubscriberInterface, ApplicationAwareInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | const WARNING_ROOT_USER = '<error>It\'s not recommended to run n98-magerun as root user</error>'; |
||
21 | |||
22 | /** |
||
23 | * @var Application |
||
24 | */ |
||
25 | private $application; |
||
26 | |||
27 | /** |
||
28 | * Returns an array of event names this subscriber wants to listen to. |
||
29 | * |
||
30 | * @return array The event names to listen to |
||
31 | * |
||
32 | * @api |
||
33 | */ |
||
34 | public static function getSubscribedEvents() |
||
40 | |||
41 | /** |
||
42 | * Display a warning if a running n98-magerun as root user |
||
43 | * |
||
44 | * @param ConsoleEvent $event |
||
45 | * @return void |
||
46 | */ |
||
47 | public function checkRunningAsRootUser(ConsoleEvent $event) |
||
69 | |||
70 | /** |
||
71 | * @return bool |
||
72 | */ |
||
73 | protected function _isSkipRootCheck(InputInterface $input) |
||
77 | |||
78 | /** |
||
79 | * @param Event $event |
||
80 | * @param string $message |
||
81 | */ |
||
82 | private function debugWriteln(Event $event, $message) |
||
89 | |||
90 | public function setApplication($application) |
||
94 | } |
||
95 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: