@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @param Table $table Table instance. |
59 | 59 | * |
60 | - * @return PrimaryKey Self. |
|
60 | + * @return ForeignKey Self. |
|
61 | 61 | */ |
62 | 62 | public function setTable(Table $table) |
63 | 63 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** |
70 | 70 | * Gets a reference table name. |
71 | 71 | * |
72 | - * @return string Reference table name. |
|
72 | + * @return Table Reference table name. |
|
73 | 73 | */ |
74 | 74 | public function getReferencedTable() |
75 | 75 | { |
@@ -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 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * Constructor. |
14 | 14 | * |
15 | 15 | * @param array|string $columns Column names. |
16 | - * @param datatype $table Table instance. |
|
16 | + * @param Table $table Table instance. |
|
17 | 17 | */ |
18 | 18 | public function __construct($columns, Table $table = null) |
19 | 19 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @param Table $table Table instance. |
48 | 48 | * |
49 | - * @return PrimaryKey Self. |
|
49 | + * @return Unique Self. |
|
50 | 50 | */ |
51 | 51 | public function setTable(Table $table) |
52 | 52 | { |
@@ -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. |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * Constructor. |
20 | 20 | * |
21 | 21 | * @param string $name Table name. |
22 | - * @param Schema $schem Schema instance. |
|
22 | + * @param Schema $schema Schema instance. |
|
23 | 23 | */ |
24 | 24 | public function __construct($name, Schema $schema = null) |
25 | 25 | { |
@@ -117,7 +117,6 @@ discard block |
||
117 | 117 | /** |
118 | 118 | * Set schema name. |
119 | 119 | * |
120 | - * @param string $name Schama name. |
|
121 | 120 | */ |
122 | 121 | public function setSchema(Schema $schema) |
123 | 122 | { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | public function getQualifiedName() |
46 | 46 | { |
47 | - return $this->schema->getName() . '.' .$this->name; |
|
47 | + return $this->schema->getName() . '.' . $this->name; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -106,6 +106,11 @@ |
||
106 | 106 | return 'http://www.example.com/symfony/schema/'; |
107 | 107 | } |
108 | 108 | |
109 | + /** |
|
110 | + * @param string $name |
|
111 | + * @param string $classParam |
|
112 | + * @param ContainerBuilder $container |
|
113 | + */ |
|
109 | 114 | private function setDefinition($name, $classParam, $container) |
110 | 115 | { |
111 | 116 | $className = $container->getParameter($classParam); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | /** |
12 | 12 | * Sets a table. |
13 | 13 | * |
14 | - * @param string $table A table instance. |
|
14 | + * @param Table $table A table instance. |
|
15 | 15 | * |
16 | 16 | * @return TableExistsCommand |
17 | 17 | */ |
@@ -9,12 +9,12 @@ |
||
9 | 9 | private $table; |
10 | 10 | |
11 | 11 | /** |
12 | - * Sets a table. |
|
13 | - * |
|
14 | - * @param string $table A table instance. |
|
15 | - * |
|
16 | - * @return TableExistsCommand |
|
17 | - */ |
|
12 | + * Sets a table. |
|
13 | + * |
|
14 | + * @param string $table A table instance. |
|
15 | + * |
|
16 | + * @return TableExistsCommand |
|
17 | + */ |
|
18 | 18 | public function setTable(Table $table) |
19 | 19 | { |
20 | 20 | $this->table = $table; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * Constructor. |
21 | 21 | * |
22 | - * @param Symfony\Component\DependencyInjection\ContainerInterface $container |
|
22 | + * @param ContainerInterface $container |
|
23 | 23 | */ |
24 | 24 | public function __construct(ContainerInterface $container) |
25 | 25 | { |
@@ -88,7 +88,6 @@ discard block |
||
88 | 88 | * Get a command to execute. |
89 | 89 | * |
90 | 90 | * @param DatabaseObjectInterface $databaseObject Database object. |
91 | - * @param bool $cascade Drop databse object cascade. |
|
92 | 91 | * |
93 | 92 | * @return Rentgen\Schema\Command |
94 | 93 | */ |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Rentgen\Schema; |
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\ContainerInterface; |
6 | - |
|
7 | 6 | use Rentgen\Rentgen; |
8 | 7 | use Rentgen\Database\Column; |
9 | 8 | use Rentgen\Database\Constraint\ConstraintInterface; |
@@ -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) { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | namespace Rentgen\Schema\Manipulation; |
3 | 3 | |
4 | 4 | use Rentgen\Schema\Command; |
5 | -use Rentgen\Database\Table; |
|
6 | 5 | use Rentgen\Schema\Adapter\Postgres\Info\GetTablesCommand; |
7 | 6 | |
8 | 7 | class DropAllTablesCommand extends Command |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function getName() |
28 | 28 | { |
29 | - return $this->table->getName() . '_' . implode('_', $this->columns) . '_idx'; |
|
29 | + return $this->table->getName() . '_' . implode('_', $this->columns) . '_idx'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -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 | /** |