/** * Checking does command contains deprecated sub commands * for example: sf cc && top && htop && irb * * @param mixed $command - array/string * @return boolean * @author Sergey Startsev */ public function hasDeprecated($command) { $commands_array = !is_array($command) ? (array) $command : $command; foreach ($commands_array as $command_element) { foreach ($this->getSubCommands($command_element) as $sub_command) { $command_name = afsConsoleCommand::getCommandName(trim($sub_command)); if ($command_name && in_array($command_name, $this->getDeprecated())) { return true; } } } return false; }