| Total Complexity | 5 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class DropDatabaseCommand extends Command |
||
| 13 | { |
||
| 14 | public const COMMAND_NAME = 'orm:database:drop'; |
||
| 15 | |||
| 16 | private const OPTION_IF_EXISTS = 'if-exists'; |
||
| 17 | |||
| 18 | /** @var Connection */ |
||
| 19 | private $connection; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | private $name; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @SuppressWarnings(PHPMD.ExcessiveParameterList) |
||
| 26 | */ |
||
| 27 | public function __construct( |
||
| 28 | string $host, |
||
| 29 | string $port, |
||
| 30 | string $name, |
||
| 31 | string $user, |
||
| 32 | string $pass |
||
| 33 | ) { |
||
| 34 | $this->connection = DriverManager::getConnection( |
||
| 35 | [ |
||
| 36 | 'driver' => 'pdo_mysql', |
||
| 37 | 'host' => $host, |
||
| 38 | 'port' => $port, |
||
| 39 | 'user' => $user, |
||
| 40 | 'password' => $pass, |
||
| 41 | ] |
||
| 42 | ); |
||
| 43 | |||
| 44 | $this->name = $name; |
||
| 45 | |||
| 46 | parent::__construct(); |
||
| 47 | } |
||
| 48 | |||
| 49 | protected function configure() |
||
| 59 | ) |
||
| 60 | ; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 65 | */ |
||
| 66 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 77 | } |
||
| 78 | } |
||
| 79 |