src/Command/CreateDatabaseDoctrineCommand.php 1 location
|
@@ 130-141 (lines=12) @@
|
| 127 |
|
* |
| 128 |
|
* @return string |
| 129 |
|
*/ |
| 130 |
|
private function getDbName(array $params, string $connectionName): string |
| 131 |
|
{ |
| 132 |
|
if (isset($params['path'])) { |
| 133 |
|
return $params['path']; |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
if (isset($params['dbname'])) { |
| 137 |
|
return $params['dbname']; |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
throw new \InvalidArgumentException('Connection does not contain a \'path\' or \'dbname\' parameter.'); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
/** |
| 144 |
|
* @param OutputInterface $output |
src/Command/DropDatabaseDoctrineCommand.php 1 location
|
@@ 146-157 (lines=12) @@
|
| 143 |
|
* |
| 144 |
|
* @return string |
| 145 |
|
*/ |
| 146 |
|
private function getDbName(array $params, string $connectionName): string |
| 147 |
|
{ |
| 148 |
|
if (isset($params['path'])) { |
| 149 |
|
return $params['path']; |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
if (isset($params['dbname'])) { |
| 153 |
|
return $params['dbname']; |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
throw new \InvalidArgumentException('Connection does not contain a \'path\' or \'dbname\' parameter.'); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
/** |
| 160 |
|
* @param OutputInterface $output |