protected function getCommand(Config $config, $mode) { $type = $config->type; switch ($type) { case 'magento2': return "cd /var/www/public;bin/magento indexer:set-mode {$mode}"; } return false; }