@@ -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', |
@@ -28,5 +28,8 @@ |
||
| 28 | 28 | |
| 29 | 29 | interface Reversible |
| 30 | 30 | { |
| 31 | + /** |
|
| 32 | + * @return void |
|
| 33 | + */ |
|
| 31 | 34 | public function reverse(); |
| 32 | 35 | } |
| 33 | 36 | \ No newline at end of file |
@@ -23,6 +23,9 @@ discard block |
||
| 23 | 23 | private $skipOnErrors = false; |
| 24 | 24 | private $yentu; |
| 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 { |