Completed
Pull Request — master (#13787)
by Thiago
22:33
created
framework/db/Migration.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      * This method contains the logic to be executed when applying this migration.
92 92
      * Child classes may override this method to provide actual migration logic.
93 93
      *
94
-     * @return bool return a false value to indicate the migration fails
94
+     * @return false|null return a false value to indicate the migration fails
95 95
      * and should not proceed further. All other return values mean the migration succeeds.
96 96
      */
97 97
     public function up()
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      * The default implementation throws an exception indicating the migration cannot be removed.
125 125
      * Child classes may override this method if the corresponding migrations can be removed.
126 126
      *
127
-     * @return bool return a false value to indicate the migration fails
127
+     * @return false|null return a false value to indicate the migration fails
128 128
      * and should not proceed further. All other return values mean the migration succeeds.
129 129
      */
130 130
     public function down()
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      * Child classes may implement this method instead of [[up()]] if the DB logic
169 169
      * needs to be within a transaction.
170 170
      *
171
-     * @return bool return a false value to indicate the migration fails
171
+     * @return boolean|null return a false value to indicate the migration fails
172 172
      * and should not proceed further. All other return values mean the migration succeeds.
173 173
      */
174 174
     public function safeUp()
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      * Child classes may implement this method instead of [[down()]] if the DB logic
183 183
      * needs to be within a transaction.
184 184
      *
185
-     * @return bool return a false value to indicate the migration fails
185
+     * @return boolean|null return a false value to indicate the migration fails
186 186
      * and should not proceed further. All other return values mean the migration succeeds.
187 187
      */
188 188
     public function safeDown()
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      *
416 416
      * @param string $name the name of the primary key constraint.
417 417
      * @param string $table the table that the primary key constraint will be added to.
418
-     * @param string|array $columns comma separated string or array of columns that the primary key will consist of.
418
+     * @param string[] $columns comma separated string or array of columns that the primary key will consist of.
419 419
      */
420 420
     public function addPrimaryKey($name, $table, $columns)
421 421
     {
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
      *
446 446
      * @param string $name the name of the foreign key constraint.
447 447
      * @param string $table the table that the foreign key constraint will be added to.
448
-     * @param string|array $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array.
448
+     * @param string $columns the name of the column to that the constraint will be added on. If there are multiple columns, separate them with commas or use an array.
449 449
      * @param string $refTable the table that the foreign key references to.
450
-     * @param string|array $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array.
450
+     * @param string $refColumns the name of the column that the foreign key references to. If there are multiple columns, separate them with commas or use an array.
451 451
      * @param string $delete the ON DELETE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
452 452
      * @param string $update the ON UPDATE option. Most DBMS support these options: RESTRICT, CASCADE, NO ACTION, SET DEFAULT, SET NULL
453 453
      */
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
      *
479 479
      * @param string $name the name of the index. The name will be properly quoted by the method.
480 480
      * @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
481
-     * @param string|array $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
481
+     * @param string $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
482 482
      * by commas or use an array. Each column name will be properly quoted by the method. Quoting will be skipped for column names that
483 483
      * include a left parenthesis "(".
484 484
      * @param bool $unique whether to add UNIQUE constraint on the created index.
Please login to merge, or discard this patch.