@@ -55,7 +55,7 @@ |
||
| 55 | 55 | return $this; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - /** |
|
| 58 | + /** |
|
| 59 | 59 | * Get column names. |
| 60 | 60 | * |
| 61 | 61 | * @return array Column names. |
@@ -181,7 +181,7 @@ |
||
| 181 | 181 | { |
| 182 | 182 | $deleteAction = strtoupper($deleteAction); |
| 183 | 183 | if (!in_array($deleteAction, $this->getAvailableActions())) { |
| 184 | - throw new \InvalidArgumentException(sprintf('Action %s does not exist.', $deleteAction)); |
|
| 184 | + throw new \InvalidArgumentException(sprintf('Action %s does not exist.', $deleteAction)); |
|
| 185 | 185 | } |
| 186 | 186 | $this->deleteAction = $deleteAction; |
| 187 | 187 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function __construct(ConnectionConfigInterface $config) |
| 16 | 16 | { |
| 17 | - $this->config = $config; |
|
| 17 | + $this->config = $config; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | private function getCommand(DatabaseObjectInterface $databaseObject, $isCreate = true) |
| 96 | 96 | { |
| 97 | 97 | if ($databaseObject instanceof Column) { |
| 98 | - $command = $this->container |
|
| 98 | + $command = $this->container |
|
| 99 | 99 | ->get($isCreate ? 'rentgen.add_column' : 'rentgen.drop_column') |
| 100 | 100 | ->setColumn($databaseObject); |
| 101 | 101 | } elseif ($databaseObject instanceof ConstraintInterface) { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ->get($isCreate ? 'rentgen.create_index' : 'rentgen.drop_index') |
| 108 | 108 | ->setIndex($databaseObject); |
| 109 | 109 | } elseif ($databaseObject instanceof Schema) { |
| 110 | - $command = $this->container |
|
| 110 | + $command = $this->container |
|
| 111 | 111 | ->get($isCreate ? 'rentgen.create_schema' : 'rentgen.drop_schema') |
| 112 | 112 | ->setSchema($databaseObject); |
| 113 | 113 | } elseif ($databaseObject instanceof Table) { |
@@ -134,13 +134,13 @@ |
||
| 134 | 134 | $escapement = new Escapement(); |
| 135 | 135 | $comments = ''; |
| 136 | 136 | foreach ($this->table->getColumns() as $column) { |
| 137 | - $columnDescription = $column->getDescription(); |
|
| 138 | - if (!empty($columnDescription)) { |
|
| 137 | + $columnDescription = $column->getDescription(); |
|
| 138 | + if (!empty($columnDescription)) { |
|
| 139 | 139 | $comments .= sprintf("COMMENT ON COLUMN %s.%s IS '%s';", |
| 140 | 140 | $escapement->escape($this->table->getQualifiedName()), |
| 141 | 141 | $escapement->escape($column->getName()), |
| 142 | 142 | $columnDescription); |
| 143 | - } |
|
| 143 | + } |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return $comments; |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | { |
| 11 | 11 | private $container; |
| 12 | 12 | |
| 13 | - /** |
|
| 14 | - * Constructor. |
|
| 15 | - * |
|
| 16 | - * @param Symfony\Component\DependencyInjection\ContainerInterface $container |
|
| 17 | - */ |
|
| 13 | + /** |
|
| 14 | + * Constructor. |
|
| 15 | + * |
|
| 16 | + * @param Symfony\Component\DependencyInjection\ContainerInterface $container |
|
| 17 | + */ |
|
| 18 | 18 | public function __construct(ContainerInterface $container) |
| 19 | 19 | { |
| 20 | 20 | $this->container = $container; |
@@ -7,10 +7,10 @@ |
||
| 7 | 7 | class Escapement implements EscapementInterface |
| 8 | 8 | { |
| 9 | 9 | /** |
| 10 | - * {@inheritdoc} |
|
| 11 | - */ |
|
| 12 | - public function escape($databaseObject) |
|
| 13 | - { |
|
| 10 | + * {@inheritdoc} |
|
| 11 | + */ |
|
| 12 | + public function escape($databaseObject) |
|
| 13 | + { |
|
| 14 | 14 | return '"' . str_replace('.', '"."', $databaseObject) . '"'; |
| 15 | - } |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -9,13 +9,13 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | private $schemaName; |
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * Sets a schema name. |
|
| 14 | - * |
|
| 15 | - * @param string $schemaName Schema name. |
|
| 16 | - * |
|
| 17 | - * @return GetTablesCommand |
|
| 18 | - */ |
|
| 12 | + /** |
|
| 13 | + * Sets a schema name. |
|
| 14 | + * |
|
| 15 | + * @param string $schemaName Schema name. |
|
| 16 | + * |
|
| 17 | + * @return GetTablesCommand |
|
| 18 | + */ |
|
| 19 | 19 | public function setSchemaName($schemaName) |
| 20 | 20 | { |
| 21 | 21 | $this->schemaName = $schemaName; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | return $this; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * {@inheritdoc} |
|
| 28 | - */ |
|
| 26 | + /** |
|
| 27 | + * {@inheritdoc} |
|
| 28 | + */ |
|
| 29 | 29 | public function getSql() |
| 30 | 30 | { |
| 31 | 31 | $schemaCondition = null === $this->schemaName |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | return $sql; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * {@inheritdoc} |
|
| 42 | - */ |
|
| 40 | + /** |
|
| 41 | + * {@inheritdoc} |
|
| 42 | + */ |
|
| 43 | 43 | public function execute() |
| 44 | 44 | { |
| 45 | 45 | $this->preExecute(); |
@@ -8,12 +8,12 @@ |
||
| 8 | 8 | private $schemaName; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * Sets a schema name. |
|
| 12 | - * |
|
| 13 | - * @param string $schemaName Schema name. |
|
| 14 | - * |
|
| 15 | - * @return SchemaExistsCommand |
|
| 16 | - */ |
|
| 11 | + * Sets a schema name. |
|
| 12 | + * |
|
| 13 | + * @param string $schemaName Schema name. |
|
| 14 | + * |
|
| 15 | + * @return SchemaExistsCommand |
|
| 16 | + */ |
|
| 17 | 17 | public function setName($schemaName) |
| 18 | 18 | { |
| 19 | 19 | $this->schemaName = $schemaName; |