@@ -1118,7 +1118,7 @@ |
||
1118 | 1118 | |
1119 | 1119 | /** |
1120 | 1120 | * Returns MySQL column types (inherited and MySQL specified). |
1121 | - * @return array |
|
1121 | + * @return string[] |
|
1122 | 1122 | */ |
1123 | 1123 | public function getColumnTypes() |
1124 | 1124 | { |
@@ -213,7 +213,7 @@ |
||
213 | 213 | * |
214 | 214 | * @param string $key |
215 | 215 | * @param string $value |
216 | - * @return object |
|
216 | + * @return TextWrapper |
|
217 | 217 | */ |
218 | 218 | public function setOption($key, $value) |
219 | 219 | { |
@@ -99,7 +99,7 @@ |
||
99 | 99 | * |
100 | 100 | * @param \Symfony\Component\Console\Input\InputInterface $input |
101 | 101 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
102 | - * @return mixed |
|
102 | + * @return string |
|
103 | 103 | * @throws \Exception |
104 | 104 | */ |
105 | 105 | protected function getMigrationPath(InputInterface $input, OutputInterface $output) |
@@ -342,6 +342,9 @@ discard block |
||
342 | 342 | $this->execute($sql); |
343 | 343 | } |
344 | 344 | |
345 | + /** |
|
346 | + * @return string |
|
347 | + */ |
|
345 | 348 | public function getColumnComment($tableName, $columnName) |
346 | 349 | { |
347 | 350 | $sql = sprintf("SELECT cast(extended_properties.[value] as nvarchar(4000)) comment |
@@ -466,6 +469,11 @@ discard block |
||
466 | 469 | ); |
467 | 470 | } |
468 | 471 | |
472 | + /** |
|
473 | + * @param string $tableName |
|
474 | + * @param string $columnName |
|
475 | + * @param string $newColumnName |
|
476 | + */ |
|
469 | 477 | protected function renameDefault($tableName, $columnName, $newColumnName) |
470 | 478 | { |
471 | 479 | $oldConstraintName = "DF_{$tableName}_{$columnName}"; |
@@ -483,6 +491,9 @@ discard block |
||
483 | 491 | )); |
484 | 492 | } |
485 | 493 | |
494 | + /** |
|
495 | + * @param string $tableName |
|
496 | + */ |
|
486 | 497 | public function changeDefault($tableName, Column $newColumn) |
487 | 498 | { |
488 | 499 | $constraintName = "DF_{$tableName}_{$newColumn->getName()}"; |
@@ -557,6 +568,10 @@ discard block |
||
557 | 568 | ); |
558 | 569 | } |
559 | 570 | |
571 | + /** |
|
572 | + * @param string $tableName |
|
573 | + * @param string $columnName |
|
574 | + */ |
|
560 | 575 | protected function dropDefaultConstraint($tableName, $columnName) |
561 | 576 | { |
562 | 577 | $defaultConstraint = $this->getDefaultConstraint($tableName, $columnName); |
@@ -1079,6 +1094,7 @@ discard block |
||
1079 | 1094 | * Gets the SqlServer Index Definition for an Index object. |
1080 | 1095 | * |
1081 | 1096 | * @param \Phinx\Db\Table\Index $index Index |
1097 | + * @param string $tableName |
|
1082 | 1098 | * @return string |
1083 | 1099 | */ |
1084 | 1100 | protected function getIndexSqlDefinition(Index $index, $tableName) |
@@ -1107,6 +1123,7 @@ discard block |
||
1107 | 1123 | * Gets the SqlServer Foreign Key Definition for an ForeignKey object. |
1108 | 1124 | * |
1109 | 1125 | * @param \Phinx\Db\Table\ForeignKey $foreignKey |
1126 | + * @param string $tableName |
|
1110 | 1127 | * @return string |
1111 | 1128 | */ |
1112 | 1129 | protected function getForeignKeySqlDefinition(ForeignKey $foreignKey, $tableName) |
@@ -45,7 +45,6 @@ |
||
45 | 45 | * |
46 | 46 | * Initialize the Phinx console application. |
47 | 47 | * |
48 | - * @param string $version The Application Version |
|
49 | 48 | */ |
50 | 49 | public function __construct() |
51 | 50 | { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | /** |
282 | 282 | * Gets an array of foreign keys waiting to be commited. |
283 | 283 | * |
284 | - * @return array|\Phinx\Db\Table\ForeignKey[] |
|
284 | + * @return ForeignKey[] |
|
285 | 285 | */ |
286 | 286 | public function getForeignKeys() |
287 | 287 | { |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | * |
333 | 333 | * Valid options can be: limit, default, null, precision or scale. |
334 | 334 | * |
335 | - * @param string|\Phinx\Db\Table\Column $columnName Column Name |
|
335 | + * @param string $columnName Column Name |
|
336 | 336 | * @param string $type Column Type |
337 | 337 | * @param array $options Column Options |
338 | 338 | * @throws \RuntimeException |
@@ -277,6 +277,10 @@ discard block |
||
277 | 277 | } |
278 | 278 | } |
279 | 279 | |
280 | + /** |
|
281 | + * @param string $sequenceName |
|
282 | + * @param string $newSequenceName |
|
283 | + */ |
|
280 | 284 | public function renameSequence($sequenceName, $newSequenceName) |
281 | 285 | { |
282 | 286 | $this->execute(sprintf('rename "%s" to "%s"', $sequenceName, $newSequenceName)); |
@@ -304,6 +308,9 @@ discard block |
||
304 | 308 | $this->execute($sql); |
305 | 309 | } |
306 | 310 | |
311 | + /** |
|
312 | + * @return string |
|
313 | + */ |
|
307 | 314 | public function getColumnComment($tableName, $columnName) |
308 | 315 | { |
309 | 316 | $sql = sprintf( |
@@ -919,6 +926,7 @@ discard block |
||
919 | 926 | * Gets the Oracle Index Definition for an Index object. |
920 | 927 | * |
921 | 928 | * @param \Phinx\Db\Table\Index $index Index |
929 | + * @param string $tableName |
|
922 | 930 | * @return string |
923 | 931 | */ |
924 | 932 | protected function getIndexSqlDefinition(Index $index, $tableName) |
@@ -947,6 +955,7 @@ discard block |
||
947 | 955 | * Gets the Oracle Foreign Key Definition for an ForeignKey object. |
948 | 956 | * |
949 | 957 | * @param \Phinx\Db\Table\ForeignKey $foreignKey |
958 | + * @param string $tableName |
|
950 | 959 | * @return string |
951 | 960 | */ |
952 | 961 | protected function getForeignKeySqlDefinition(ForeignKey $foreignKey, $tableName) |
@@ -1060,6 +1069,9 @@ discard block |
||
1060 | 1069 | $stmt->execute($vals); |
1061 | 1070 | } |
1062 | 1071 | |
1072 | + /** |
|
1073 | + * @param string $sequence |
|
1074 | + */ |
|
1063 | 1075 | protected function getNextValSequence($sequence) |
1064 | 1076 | { |
1065 | 1077 | $sql = "SELECT %s.NEXTVAL FROM DUAL"; |