private function createCommand($expression, callable $callable) { $result = $this->expressionParser->parse($expression); $command = new Command($result['name']); $command->getDefinition()->addArguments($result['arguments']); $command->getDefinition()->addOptions($result['options']); $command->setCode($callable); return $command; }