@@ -214,7 +214,7 @@ |
||
214 | 214 | /** |
215 | 215 | * Gets the command start time |
216 | 216 | * |
217 | - * @return int |
|
217 | + * @return double |
|
218 | 218 | */ |
219 | 219 | public function getCommandStartTime() |
220 | 220 | { |
@@ -475,6 +475,11 @@ discard block |
||
475 | 475 | $this->endCommandTimer(); |
476 | 476 | } |
477 | 477 | |
478 | + /** |
|
479 | + * @param string $tableName |
|
480 | + * @param string $columnName |
|
481 | + * @param string $newColumnName |
|
482 | + */ |
|
478 | 483 | protected function renameDefault($tableName, $columnName, $newColumnName) |
479 | 484 | { |
480 | 485 | $oldConstraintName = "DF_{$tableName}_{$columnName}"; |
@@ -492,6 +497,9 @@ discard block |
||
492 | 497 | )); |
493 | 498 | } |
494 | 499 | |
500 | + /** |
|
501 | + * @param string $tableName |
|
502 | + */ |
|
495 | 503 | public function changeDefault($tableName, Column $newColumn) |
496 | 504 | { |
497 | 505 | $constraintName = "DF_{$tableName}_{$newColumn->getName()}"; |
@@ -572,6 +580,10 @@ discard block |
||
572 | 580 | $this->endCommandTimer(); |
573 | 581 | } |
574 | 582 | |
583 | + /** |
|
584 | + * @param string $tableName |
|
585 | + * @param string $columnName |
|
586 | + */ |
|
575 | 587 | protected function dropDefaultConstraint($tableName, $columnName) |
576 | 588 | { |
577 | 589 | $defaultConstraint = $this->getDefaultConstraint($tableName, $columnName); |
@@ -1094,6 +1106,7 @@ discard block |
||
1094 | 1106 | * Gets the SqlServer Index Definition for an Index object. |
1095 | 1107 | * |
1096 | 1108 | * @param Index $index Index |
1109 | + * @param string $tableName |
|
1097 | 1110 | * @return string |
1098 | 1111 | */ |
1099 | 1112 | protected function getIndexSqlDefinition(Index $index, $tableName) |
@@ -1122,6 +1135,7 @@ discard block |
||
1122 | 1135 | * Gets the SqlServer Foreign Key Definition for an ForeignKey object. |
1123 | 1136 | * |
1124 | 1137 | * @param ForeignKey $foreignKey |
1138 | + * @param string $tableName |
|
1125 | 1139 | * @return string |
1126 | 1140 | */ |
1127 | 1141 | protected function getForeignKeySqlDefinition(ForeignKey $foreignKey, $tableName) |
@@ -165,7 +165,7 @@ |
||
165 | 165 | * |
166 | 166 | * @param string $key |
167 | 167 | * @param string $value |
168 | - * @return object |
|
168 | + * @return TextWrapper |
|
169 | 169 | */ |
170 | 170 | public function setOption($key, $value) |
171 | 171 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Console\Tester\CommandTester; |
6 | 6 | use Symfony\Component\Console\Output\StreamOutput; |
7 | -use Phinx\Config\Config; |
|
8 | 7 | use Phinx\Console\Command\Init; |
9 | 8 | |
10 | 9 | class InitTest extends \PHPUnit_Framework_TestCase |
@@ -76,6 +76,10 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | // helper methods for easy mocking |
79 | + |
|
80 | + /** |
|
81 | + * @param string $expected_sql |
|
82 | + */ |
|
79 | 83 | private function assertExecuteSql($expected_sql) |
80 | 84 | { |
81 | 85 | $this->conn->expects($this->once()) |
@@ -83,6 +87,9 @@ discard block |
||
83 | 87 | ->with($this->equalTo($expected_sql)); |
84 | 88 | } |
85 | 89 | |
90 | + /** |
|
91 | + * @param \PHPUnit_Framework_TestResult $returnValue |
|
92 | + */ |
|
86 | 93 | private function assertQuerySql($expectedSql, $returnValue = null) |
87 | 94 | { |
88 | 95 | $expect = $this->conn->expects($this->once()) |
@@ -93,6 +100,9 @@ discard block |
||
93 | 100 | } |
94 | 101 | } |
95 | 102 | |
103 | + /** |
|
104 | + * @param string $expectedSql |
|
105 | + */ |
|
96 | 106 | private function assertFetchRowSql($expectedSql, $returnValue) |
97 | 107 | { |
98 | 108 | $this->result->expects($this->once()) |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Console\Output\StreamOutput; |
6 | 6 | use Phinx\Config\Config; |
7 | -use Phinx\Db\Adapter\MysqlAdapter; |
|
8 | 7 | use Phinx\Migration\Manager; |
9 | 8 | use Phinx\Migration\Manager\Environment; |
10 | 9 |
@@ -6,6 +6,9 @@ |
||
6 | 6 | |
7 | 7 | class UtilTest extends \PHPUnit_Framework_TestCase |
8 | 8 | { |
9 | + /** |
|
10 | + * @param string $path |
|
11 | + */ |
|
9 | 12 | private function getCorrectedPath($path) |
10 | 13 | { |
11 | 14 | return str_replace('/', DIRECTORY_SEPARATOR, $path); |
@@ -129,6 +129,9 @@ |
||
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | + /** |
|
133 | + * @param string $lines |
|
134 | + */ |
|
132 | 135 | protected function indent($lines) |
133 | 136 | { |
134 | 137 | return trim(str_replace("\n", "\n ", $lines)); |
@@ -98,6 +98,9 @@ |
||
98 | 98 | ); |
99 | 99 | } |
100 | 100 | |
101 | + /** |
|
102 | + * @param string $content |
|
103 | + */ |
|
101 | 104 | private function createDOMDocument($content) |
102 | 105 | { |
103 | 106 | $document = new DOMDocument; |
@@ -326,6 +326,9 @@ |
||
326 | 326 | $this->assertEquals(array(true), $this->exporter->toArray(true)); |
327 | 327 | } |
328 | 328 | |
329 | + /** |
|
330 | + * @param string $string |
|
331 | + */ |
|
329 | 332 | private function trimNewline($string) |
330 | 333 | { |
331 | 334 | return preg_replace('/[ ]*\n/', "\n", $string); |