@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @param $index_name |
| 22 | 22 | * @param $wizard |
| 23 | 23 | */ |
| 24 | - public function __construct($index_name,$wizard) |
|
| 24 | + public function __construct($index_name, $wizard) |
|
| 25 | 25 | { |
| 26 | 26 | $this->wizard = $wizard; |
| 27 | 27 | $this->index_name = $index_name; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function fulltext() |
| 34 | 34 | { |
| 35 | - $this->wizard->updateIndexesForSpecialist($this->index_name,__FUNCTION__); |
|
| 35 | + $this->wizard->updateIndexesForSpecialist($this->index_name, __FUNCTION__); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function unique() |
| 42 | 42 | { |
| 43 | - $this->wizard->updateIndexesForSpecialist($this->index_name,__FUNCTION__); |
|
| 43 | + $this->wizard->updateIndexesForSpecialist($this->index_name, __FUNCTION__); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | } |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | use Migratio\Contract\WizardContract; |
| 6 | 6 | use Migratio\Contract\WizardAlterContract; |
| 7 | 7 | |
| 8 | -class WizardAlter extends Wizard implements WizardContract,WizardAlterContract |
|
| 8 | +class WizardAlter extends Wizard implements WizardContract, WizardAlterContract |
|
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | 11 | * @var $after |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function __construct($wizard) |
| 20 | 20 | { |
| 21 | - $this->wizard=$wizard; |
|
| 21 | + $this->wizard = $wizard; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function after($field) |
| 29 | 29 | { |
| 30 | - $this->wizard->setAlterType('place',['AFTER'=>$field]); |
|
| 30 | + $this->wizard->setAlterType('place', ['AFTER'=>$field]); |
|
| 31 | 31 | |
| 32 | 32 | return $this->wizard; |
| 33 | 33 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function __construct($wizard) |
| 18 | 18 | { |
| 19 | - $this->wizard=$wizard; |
|
| 19 | + $this->wizard = $wizard; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function __construct($wizard) |
| 19 | 19 | { |
| 20 | - $this->wizard=$wizard; |
|
| 20 | + $this->wizard=$wizard; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function __construct($wizard) |
| 19 | 19 | { |
| 20 | - $this->wizard=$wizard; |
|
| 20 | + $this->wizard = $wizard; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public function bigint($value) |
| 28 | 28 | { |
| 29 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 29 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 30 | 30 | |
| 31 | 31 | return $this->wizard; |
| 32 | 32 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function binary($value) |
| 39 | 39 | { |
| 40 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 40 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 41 | 41 | |
| 42 | 42 | return $this->wizard; |
| 43 | 43 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function bit($value) |
| 50 | 50 | { |
| 51 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 51 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 52 | 52 | |
| 53 | 53 | return $this->wizard; |
| 54 | 54 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function blob() |
| 60 | 60 | { |
| 61 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 61 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 62 | 62 | |
| 63 | 63 | return $this->wizard; |
| 64 | 64 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function char($value) |
| 71 | 71 | { |
| 72 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 72 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 73 | 73 | |
| 74 | 74 | return $this->wizard; |
| 75 | 75 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function date() |
| 81 | 81 | { |
| 82 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 82 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 83 | 83 | |
| 84 | 84 | return $this->wizard; |
| 85 | 85 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function dateTime() |
| 91 | 91 | { |
| 92 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 92 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 93 | 93 | |
| 94 | 94 | return $this->wizard; |
| 95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function decimal() |
| 101 | 101 | { |
| 102 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 102 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 103 | 103 | |
| 104 | 104 | return $this->wizard; |
| 105 | 105 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function double() |
| 111 | 111 | { |
| 112 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 112 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 113 | 113 | |
| 114 | 114 | return $this->wizard; |
| 115 | 115 | } |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | * @param $value |
| 119 | 119 | * @return WizardContract |
| 120 | 120 | */ |
| 121 | - public function enum($value=array()) |
|
| 121 | + public function enum($value = array()) |
|
| 122 | 122 | { |
| 123 | - $this->wizard->setTypes(__FUNCTION__,$value,'enum'); |
|
| 123 | + $this->wizard->setTypes(__FUNCTION__, $value, 'enum'); |
|
| 124 | 124 | |
| 125 | 125 | return $this->wizard; |
| 126 | 126 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function float() |
| 132 | 132 | { |
| 133 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 133 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 134 | 134 | |
| 135 | 135 | return $this->wizard; |
| 136 | 136 | } |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | * @param int $value |
| 140 | 140 | * @return WizardContract |
| 141 | 141 | */ |
| 142 | - public function int($value=11) |
|
| 142 | + public function int($value = 11) |
|
| 143 | 143 | { |
| 144 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 144 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 145 | 145 | |
| 146 | 146 | return $this->wizard; |
| 147 | 147 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function longtext() |
| 153 | 153 | { |
| 154 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 154 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 155 | 155 | |
| 156 | 156 | return $this->wizard; |
| 157 | 157 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function mediumtext() |
| 163 | 163 | { |
| 164 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 164 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 165 | 165 | |
| 166 | 166 | return $this->wizard; |
| 167 | 167 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function json() |
| 174 | 174 | { |
| 175 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 175 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 176 | 176 | |
| 177 | 177 | return $this->wizard; |
| 178 | 178 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function set($value) |
| 185 | 185 | { |
| 186 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 186 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 187 | 187 | |
| 188 | 188 | return $this->wizard; |
| 189 | 189 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function text($value) |
| 196 | 196 | { |
| 197 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 197 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 198 | 198 | |
| 199 | 199 | return $this->wizard; |
| 200 | 200 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | public function time($value) |
| 207 | 207 | { |
| 208 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 208 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 209 | 209 | |
| 210 | 210 | return $this->wizard; |
| 211 | 211 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | public function mediumint($value) |
| 218 | 218 | { |
| 219 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 219 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 220 | 220 | |
| 221 | 221 | return $this->wizard; |
| 222 | 222 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | public function timestamp($value) |
| 229 | 229 | { |
| 230 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 230 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 231 | 231 | |
| 232 | 232 | return $this->wizard; |
| 233 | 233 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function real() |
| 239 | 239 | { |
| 240 | - $this->wizard->setTypes(__FUNCTION__,null); |
|
| 240 | + $this->wizard->setTypes(__FUNCTION__, null); |
|
| 241 | 241 | |
| 242 | 242 | return $this->wizard; |
| 243 | 243 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | */ |
| 249 | 249 | public function smallint($value) |
| 250 | 250 | { |
| 251 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 251 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 252 | 252 | |
| 253 | 253 | return $this->wizard; |
| 254 | 254 | } |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | public function tinyint($value) |
| 261 | 261 | { |
| 262 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 262 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 263 | 263 | |
| 264 | 264 | return $this->wizard; |
| 265 | 265 | } |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | */ |
| 271 | 271 | public function tinytext($value) |
| 272 | 272 | { |
| 273 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 273 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 274 | 274 | |
| 275 | 275 | return $this->wizard; |
| 276 | 276 | } |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | public function varchar($value) |
| 283 | 283 | { |
| 284 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 284 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 285 | 285 | |
| 286 | 286 | return $this->wizard; |
| 287 | 287 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | */ |
| 293 | 293 | public function year($value) |
| 294 | 294 | { |
| 295 | - $this->wizard->setTypes(__FUNCTION__,$value); |
|
| 295 | + $this->wizard->setTypes(__FUNCTION__, $value); |
|
| 296 | 296 | |
| 297 | 297 | return $this->wizard; |
| 298 | 298 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | public function name($name) |
| 132 | 132 | { |
| 133 | 133 | if(in_array($name,$this->name)){ |
| 134 | - $this->setError('You have written the '.$name.' name more than 1.'); |
|
| 134 | + $this->setError('You have written the '.$name.' name more than 1.'); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | $this->name[]=$name; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $auto_increment=array(); |
|
| 28 | + protected $auto_increment = array(); |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * @var $collation |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * @var array $primaryKey |
| 42 | 42 | */ |
| 43 | - protected $primaryKey=array(); |
|
| 43 | + protected $primaryKey = array(); |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @var array $references |
| 47 | 47 | */ |
| 48 | - protected $references=array(); |
|
| 48 | + protected $references = array(); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @var $schemaType |
@@ -60,17 +60,17 @@ discard block |
||
| 60 | 60 | /** |
| 61 | 61 | * @var $name array |
| 62 | 62 | */ |
| 63 | - protected $name=array(); |
|
| 63 | + protected $name = array(); |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * @var array $nullable |
| 67 | 67 | */ |
| 68 | - protected $nullable=array(); |
|
| 68 | + protected $nullable = array(); |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * @var array $types |
| 72 | 72 | */ |
| 73 | - protected $types=array(); |
|
| 73 | + protected $types = array(); |
|
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | 76 | * @var $engine |
@@ -80,17 +80,17 @@ discard block |
||
| 80 | 80 | /** |
| 81 | 81 | * @var $default array |
| 82 | 82 | */ |
| 83 | - protected $default=array(); |
|
| 83 | + protected $default = array(); |
|
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * @var array $index |
| 87 | 87 | */ |
| 88 | - protected $index=array(); |
|
| 88 | + protected $index = array(); |
|
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @var array $unique |
| 92 | 92 | */ |
| 93 | - protected $unique=array(); |
|
| 93 | + protected $unique = array(); |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * @var $table |
@@ -102,13 +102,13 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function auto_increment() |
| 104 | 104 | { |
| 105 | - if(count($this->auto_increment)==0){ |
|
| 105 | + if (count($this->auto_increment)==0) { |
|
| 106 | 106 | |
| 107 | - if($this->getLastName()===false){ |
|
| 108 | - $this->name[]='id'; |
|
| 109 | - $this->setTypes('int',14); |
|
| 107 | + if ($this->getLastName()===false) { |
|
| 108 | + $this->name[] = 'id'; |
|
| 109 | + $this->setTypes('int', 14); |
|
| 110 | 110 | } |
| 111 | - $this->auto_increment[$this->getLastName()]=true; |
|
| 111 | + $this->auto_increment[$this->getLastName()] = true; |
|
| 112 | 112 | $this->primaryKey(); |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function comment($value) |
| 121 | 121 | { |
| 122 | - $this->comment[$this->getLastName()]=$value; |
|
| 122 | + $this->comment[$this->getLastName()] = $value; |
|
| 123 | 123 | |
| 124 | 124 | return $this; |
| 125 | 125 | } |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function name($name) |
| 132 | 132 | { |
| 133 | - if(in_array($name,$this->name)){ |
|
| 133 | + if (in_array($name, $this->name)) { |
|
| 134 | 134 | $this->setError('You have written the '.$name.' name more than 1.'); |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - $this->name[]=$name; |
|
| 137 | + $this->name[] = $name; |
|
| 138 | 138 | |
| 139 | 139 | return new Types($this); |
| 140 | 140 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function default($value) |
| 148 | 148 | { |
| 149 | - $this->default[$this->getLastName()]=$value; |
|
| 149 | + $this->default[$this->getLastName()] = $value; |
|
| 150 | 150 | |
| 151 | 151 | return $this; |
| 152 | 152 | } |
@@ -156,14 +156,14 @@ discard block |
||
| 156 | 156 | * @param bool $table |
| 157 | 157 | * @return $this |
| 158 | 158 | */ |
| 159 | - public function collation($value,$table=false) |
|
| 159 | + public function collation($value, $table = false) |
|
| 160 | 160 | { |
| 161 | - if($table===false) |
|
| 161 | + if ($table===false) |
|
| 162 | 162 | { |
| 163 | - $this->collation[$this->getLastName()]=$value; |
|
| 163 | + $this->collation[$this->getLastName()] = $value; |
|
| 164 | 164 | } |
| 165 | - else{ |
|
| 166 | - $this->collation['table']=$value; |
|
| 165 | + else { |
|
| 166 | + $this->collation['table'] = $value; |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | return $this; |
@@ -175,17 +175,17 @@ discard block |
||
| 175 | 175 | * @param bool $key |
| 176 | 176 | * @return $this|WizardContract |
| 177 | 177 | */ |
| 178 | - public function index($name=null,$value=null,$key=false) |
|
| 178 | + public function index($name = null, $value = null, $key = false) |
|
| 179 | 179 | { |
| 180 | 180 | $name = ($name===null) ? $this->getLastName() : $name; |
| 181 | 181 | $value = ($value===null) ? $name : $value; |
| 182 | 182 | |
| 183 | - if($key===false){ |
|
| 184 | - $this->index[$this->getLastName()]=['name'=>$name,'value'=>$value]; |
|
| 183 | + if ($key===false) { |
|
| 184 | + $this->index[$this->getLastName()] = ['name'=>$name, 'value'=>$value]; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - if($key===true){ |
|
| 188 | - $this->index['indexes'][]=['name'=>$name,'value'=>$value]; |
|
| 187 | + if ($key===true) { |
|
| 188 | + $this->index['indexes'][] = ['name'=>$name, 'value'=>$value]; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | return $this; |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | * @param bool $null |
| 196 | 196 | * @return $this |
| 197 | 197 | */ |
| 198 | - public function nullable($null=true) |
|
| 198 | + public function nullable($null = true) |
|
| 199 | 199 | { |
| 200 | - $this->nullable[$this->getLastName()]=$null; |
|
| 200 | + $this->nullable[$this->getLastName()] = $null; |
|
| 201 | 201 | |
| 202 | 202 | return $this; |
| 203 | 203 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | public function primaryKey() |
| 209 | 209 | { |
| 210 | - $this->primaryKey[$this->getLastName()]=true; |
|
| 210 | + $this->primaryKey[$this->getLastName()] = true; |
|
| 211 | 211 | |
| 212 | 212 | return $this; |
| 213 | 213 | } |
@@ -225,12 +225,12 @@ discard block |
||
| 225 | 225 | * @param null $value |
| 226 | 226 | * @return $this|mixed |
| 227 | 227 | */ |
| 228 | - public function unique($name=null,$value=null) |
|
| 228 | + public function unique($name = null, $value = null) |
|
| 229 | 229 | { |
| 230 | 230 | $name = ($name===null) ? $this->getLastName() : $name; |
| 231 | 231 | $value = ($value===null) ? $name : $value; |
| 232 | 232 | |
| 233 | - $this->unique[$this->getLastName()]=['name'=>$name,'value'=>$value]; |
|
| 233 | + $this->unique[$this->getLastName()] = ['name'=>$name, 'value'=>$value]; |
|
| 234 | 234 | |
| 235 | 235 | return $this; |
| 236 | 236 | } |
@@ -161,8 +161,7 @@ |
||
| 161 | 161 | if($table===false) |
| 162 | 162 | { |
| 163 | 163 | $this->collation[$this->getLastName()]=$value; |
| 164 | - } |
|
| 165 | - else{ |
|
| 164 | + } else{ |
|
| 166 | 165 | $this->collation['table']=$value; |
| 167 | 166 | } |
| 168 | 167 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct($wizard) |
| 26 | 26 | { |
| 27 | - $this->wizard=$wizard; |
|
| 27 | + $this->wizard = $wizard; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function constraint($constraint) |
| 35 | 35 | { |
| 36 | - $this->constraint=$constraint; |
|
| 36 | + $this->constraint = $constraint; |
|
| 37 | 37 | return $this; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $table = $this->wizard->getTable(); |
| 49 | 49 | |
| 50 | - $this->wizard->setReferences($constraint,'key',$key); |
|
| 50 | + $this->wizard->setReferences($constraint, 'key', $key); |
|
| 51 | 51 | |
| 52 | - return new References($this->wizard,$constraint); |
|
| 52 | + return new References($this->wizard, $constraint); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | * @param $wizard |
| 22 | 22 | * @param $constraint |
| 23 | 23 | */ |
| 24 | - public function __construct($wizard,$constraint) |
|
| 24 | + public function __construct($wizard, $constraint) |
|
| 25 | 25 | { |
| 26 | - $this->wizard=$wizard; |
|
| 27 | - $this->constraint=$constraint; |
|
| 26 | + $this->wizard = $wizard; |
|
| 27 | + $this->constraint = $constraint; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -34,12 +34,12 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function references($table, $field = 'id') |
| 36 | 36 | { |
| 37 | - $this->wizard->setReferences($this->constraint,'references', |
|
| 37 | + $this->wizard->setReferences($this->constraint, 'references', |
|
| 38 | 38 | [ |
| 39 | 39 | 'table'=>$table, |
| 40 | 40 | 'field'=>$field |
| 41 | 41 | ]); |
| 42 | 42 | |
| 43 | - return new Options($this->wizard,$this->constraint); |
|
| 43 | + return new Options($this->wizard, $this->constraint); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | \ No newline at end of file |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | * @param $wizard |
| 22 | 22 | * @param $constraint |
| 23 | 23 | */ |
| 24 | - public function __construct($wizard,$constraint) |
|
| 24 | + public function __construct($wizard, $constraint) |
|
| 25 | 25 | { |
| 26 | - $this->wizard=$wizard; |
|
| 27 | - $this->constraint=$constraint; |
|
| 26 | + $this->wizard = $wizard; |
|
| 27 | + $this->constraint = $constraint; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function cascade() |
| 34 | 34 | { |
| 35 | - $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__); |
|
| 35 | + $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function noAction() |
| 42 | 42 | { |
| 43 | - $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__); |
|
| 43 | + $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function restrict() |
| 50 | 50 | { |
| 51 | - $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__); |
|
| 51 | + $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function setDefault() |
| 58 | 58 | { |
| 59 | - $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__); |
|
| 59 | + $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function setNull() |
| 66 | 66 | { |
| 67 | - $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__); |
|
| 67 | + $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | * @param $wizard |
| 22 | 22 | * @param $constraint |
| 23 | 23 | */ |
| 24 | - public function __construct($wizard,$constraint) |
|
| 24 | + public function __construct($wizard, $constraint) |
|
| 25 | 25 | { |
| 26 | - $this->wizard=$wizard; |
|
| 27 | - $this->constraint=$constraint; |
|
| 26 | + $this->wizard = $wizard; |
|
| 27 | + $this->constraint = $constraint; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function onDelete() |
| 34 | 34 | { |
| 35 | - $this->wizard->setReferences($this->constraint,'on','ON DELETE'); |
|
| 36 | - return new OptionsProperties($this->wizard,$this->constraint); |
|
| 35 | + $this->wizard->setReferences($this->constraint, 'on', 'ON DELETE'); |
|
| 36 | + return new OptionsProperties($this->wizard, $this->constraint); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function onUpdate() |
| 43 | 43 | { |
| 44 | - $this->wizard->setReferences($this->constraint,'on','ON UPDATE'); |
|
| 45 | - return new OptionsProperties($this->wizard,$this->constraint); |
|
| 44 | + $this->wizard->setReferences($this->constraint, 'on', 'ON UPDATE'); |
|
| 45 | + return new OptionsProperties($this->wizard, $this->constraint); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | } |
| 49 | 49 | \ No newline at end of file |