@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return $this->newVersion; |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
88 | 91 | private function generateSchemaCode($description, $ref = false, $prefix = '') |
89 | 92 | { |
90 | 93 | $refprefix = $ref === true ? 'ref' : '->'; |
@@ -193,6 +196,9 @@ discard block |
||
193 | 196 | } |
194 | 197 | } |
195 | 198 | |
199 | + /** |
|
200 | + * @param string $type |
|
201 | + */ |
|
196 | 202 | protected function importConstraints($type, $constraints) |
197 | 203 | { |
198 | 204 | foreach ($constraints as $name => $constraint) { |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use clearice\io\Io; |
6 | 6 | use yentu\CodeWriter; |
7 | +use yentu\Migrations; |
|
7 | 8 | use yentu\exceptions\CommandException; |
8 | 9 | use yentu\factories\DatabaseManipulatorFactory; |
9 | -use yentu\Migrations; |
|
10 | 10 | |
11 | 11 | class Import extends Command implements Reversible |
12 | 12 | { |
@@ -63,6 +63,9 @@ |
||
63 | 63 | $this->io = $io; |
64 | 64 | } |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $filter |
|
68 | + */ |
|
66 | 69 | public function setupOptions($options, &$filter) |
67 | 70 | { |
68 | 71 | if (isset($options['no-foreign-keys'])) { |
@@ -27,12 +27,12 @@ |
||
27 | 27 | namespace yentu\commands; |
28 | 28 | |
29 | 29 | use clearice\io\Io; |
30 | +use yentu\ChangeLogger; |
|
31 | +use yentu\Migrations; |
|
30 | 32 | use yentu\database\Begin; |
31 | 33 | use yentu\database\DatabaseItem; |
32 | -use yentu\ChangeLogger; |
|
33 | 34 | use yentu\database\ForeignKey; |
34 | 35 | use yentu\factories\DatabaseManipulatorFactory; |
35 | -use yentu\Migrations; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * The migrate command for the yentu database migration system. This class is |
@@ -62,6 +62,9 @@ |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param \yentu\manipulators\AbstractDatabaseManipulator $db |
|
67 | + */ |
|
65 | 68 | private function getOperations($db, $set) |
66 | 69 | { |
67 | 70 | $operations = []; |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace yentu\commands; |
4 | 4 | |
5 | +use clearice\io\Io; |
|
5 | 6 | use yentu\ChangeReverser; |
6 | 7 | use yentu\database\DatabaseItem; |
7 | 8 | use yentu\factories\DatabaseManipulatorFactory; |
8 | -use clearice\io\Io; |
|
9 | 9 | |
10 | 10 | class Rollback extends Command |
11 | 11 | { |
@@ -177,6 +177,9 @@ |
||
177 | 177 | return $this->schemaDescription; |
178 | 178 | } |
179 | 179 | |
180 | + /** |
|
181 | + * @param string $version |
|
182 | + */ |
|
180 | 183 | public function setVersion($version) |
181 | 184 | { |
182 | 185 | $this->query('INSERT INTO yentu_history(version) values (?)', array($version)); |
@@ -4,11 +4,10 @@ |
||
4 | 4 | |
5 | 5 | use clearice\io\Io; |
6 | 6 | use ntentan\atiaa\DriverFactory; |
7 | -use yentu\Yentu; |
|
8 | 7 | use yentu\DatabaseAssertor; |
8 | +use yentu\Parameters; |
|
9 | 9 | use yentu\SchemaDescription; |
10 | 10 | use yentu\exceptions\DatabaseManipulatorException; |
11 | -use yentu\Parameters; |
|
12 | 11 | |
13 | 12 | abstract class AbstractDatabaseManipulator |
14 | 13 | { |
@@ -3,11 +3,9 @@ |
||
3 | 3 | namespace yentu\commands; |
4 | 4 | |
5 | 5 | |
6 | -use yentu\factories\DatabaseManipulatorFactory; |
|
7 | -use yentu\manipulators\AbstractDatabaseManipulator; |
|
8 | -use yentu\Migrations; |
|
9 | -use yentu\Yentu; |
|
10 | 6 | use clearice\io\Io; |
7 | +use yentu\Migrations; |
|
8 | +use yentu\factories\DatabaseManipulatorFactory; |
|
11 | 9 | |
12 | 10 | /** |
13 | 11 | * |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | private $skipOnErrors = false; |
24 | 24 | private $migrations; |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $itemType |
|
28 | + */ |
|
26 | 29 | public function skip($itemType) |
27 | 30 | { |
28 | 31 | $this->skippedItemTypes[] = $itemType; |
@@ -41,6 +44,9 @@ discard block |
||
41 | 44 | $this->dryRun = $dryRun; |
42 | 45 | } |
43 | 46 | |
47 | + /** |
|
48 | + * @param string $itemType |
|
49 | + */ |
|
44 | 50 | public function allowOnly($itemType) |
45 | 51 | { |
46 | 52 | $this->allowedItemTypes[] = $itemType; |
@@ -70,6 +76,9 @@ discard block |
||
70 | 76 | $this->migration = $migration; |
71 | 77 | } |
72 | 78 | |
79 | + /** |
|
80 | + * @param string[] $matches |
|
81 | + */ |
|
73 | 82 | private function performOperation($method, $matches, $arguments) |
74 | 83 | { |
75 | 84 | try { |
@@ -27,11 +27,11 @@ |
||
27 | 27 | namespace yentu\commands; |
28 | 28 | |
29 | 29 | use clearice\io\Io; |
30 | -use yentu\factories\DatabaseManipulatorFactory; |
|
31 | 30 | use yentu\Migrations; |
32 | 31 | use yentu\Parameters; |
33 | 32 | use yentu\commands\Reversible; |
34 | 33 | use yentu\exceptions\CommandException; |
34 | +use yentu\factories\DatabaseManipulatorFactory; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * The init command class. This command intiates a project for yentu migration |
@@ -28,5 +28,8 @@ |
||
28 | 28 | |
29 | 29 | interface Reversible |
30 | 30 | { |
31 | + /** |
|
32 | + * @return void |
|
33 | + */ |
|
31 | 34 | public function reverseActions(); |
32 | 35 | } |
33 | 36 | \ No newline at end of file |
@@ -29,15 +29,15 @@ |
||
29 | 29 | |
30 | 30 | use clearice\argparser\ArgumentParser; |
31 | 31 | use clearice\io\Io; |
32 | -use yentu\manipulators\AbstractDatabaseManipulator; |
|
33 | 32 | use ntentan\atiaa\DriverFactory; |
34 | -use yentu\Migrations; |
|
35 | -use yentu\Yentu; |
|
36 | 33 | use ntentan\config\Config; |
37 | -use yentu\commands\Migrate; |
|
38 | 34 | use ntentan\panie\Container; |
39 | 35 | use yentu\Cli; |
36 | +use yentu\Migrations; |
|
37 | +use yentu\Yentu; |
|
40 | 38 | use yentu\commands\Command; |
39 | +use yentu\commands\Migrate; |
|
40 | +use yentu\manipulators\AbstractDatabaseManipulator; |
|
41 | 41 | |
42 | 42 | $container = new Container(); |
43 | 43 | $container->setup(get_container_settings()); |