@@ -30,6 +30,9 @@ |
||
30 | 30 | { |
31 | 31 | private $defaultSchema; |
32 | 32 | |
33 | + /** |
|
34 | + * @param boolean $defaultSchema |
|
35 | + */ |
|
33 | 36 | public function __construct($defaultSchema) |
34 | 37 | { |
35 | 38 | $this->defaultSchema = new Schema($defaultSchema); |
@@ -29,6 +29,10 @@ |
||
29 | 29 | 'query' => 'Query' |
30 | 30 | ); |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $property |
|
34 | + * @param string $attribute |
|
35 | + */ |
|
32 | 36 | protected function addChange($property, $attribute, $value, $callback = null) |
33 | 37 | { |
34 | 38 | if(!$this->isNew()){ |
@@ -21,6 +21,9 @@ |
||
21 | 21 | return $this->isReference; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param boolean $isReference |
|
26 | + */ |
|
24 | 27 | public function setIsReference($isReference) |
25 | 28 | { |
26 | 29 | $this->isReference = $isReference; |
@@ -14,6 +14,9 @@ discard block |
||
14 | 14 | // Description |
15 | 15 | public $name; |
16 | 16 | |
17 | + /** |
|
18 | + * @param Schema $schema |
|
19 | + */ |
|
17 | 20 | public function __construct($name, $schema) |
18 | 21 | { |
19 | 22 | $this->name = $name; |
@@ -26,6 +29,9 @@ discard block |
||
26 | 29 | } |
27 | 30 | } |
28 | 31 | |
32 | + /** |
|
33 | + * @param boolean $isReference |
|
34 | + */ |
|
29 | 35 | public function setIsReference($isReference) |
30 | 36 | { |
31 | 37 | $this->isReference = $isReference; |
@@ -61,6 +61,9 @@ |
||
61 | 61 | Parameters::wrap($table['columns'][$details['name']]) : false; |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param string $type |
|
66 | + */ |
|
64 | 67 | private function doesItemExist($details, $type) |
65 | 68 | { |
66 | 69 | $table = $this->getTableDetails($details['schema'], $details['table']); |
@@ -24,8 +24,8 @@ |
||
24 | 24 | * THE SOFTWARE. |
25 | 25 | */ |
26 | 26 | |
27 | -use yentu\database\Table; |
|
28 | 27 | use yentu\database\Schema; |
28 | +use yentu\database\Table; |
|
29 | 29 | use yentu\exceptions\CommandException; |
30 | 30 | |
31 | 31 | function begin() |
@@ -180,6 +180,9 @@ discard block |
||
180 | 180 | ); |
181 | 181 | } |
182 | 182 | |
183 | + /** |
|
184 | + * @param string $type |
|
185 | + */ |
|
183 | 186 | private function dropKeyItem($details, $type) { |
184 | 187 | $this->query( |
185 | 188 | sprintf( |
@@ -242,6 +245,9 @@ discard block |
||
242 | 245 | return "\"$identifier\""; |
243 | 246 | } |
244 | 247 | |
248 | + /** |
|
249 | + * @param string $direction |
|
250 | + */ |
|
245 | 251 | public function convertTypes($type, $direction, $length = null) { |
246 | 252 | $types = array( |
247 | 253 | 'integer' => 'integer', |
@@ -5,6 +5,9 @@ |
||
5 | 5 | { |
6 | 6 | private static $driver; |
7 | 7 | |
8 | + /** |
|
9 | + * @param manipulators\AbstractDatabaseManipulator $driver |
|
10 | + */ |
|
8 | 11 | public static function setDriver($driver) |
9 | 12 | { |
10 | 13 | self::$driver = $driver; |
@@ -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 | { |