@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | * @param int|null $length |
| 37 | 37 | * @return Column |
| 38 | 38 | */ |
| 39 | - public function varchar( ?int $length = null ): Column { |
|
| 40 | - $this->type( 'varchar' ); |
|
| 41 | - if ( null !== $length ) { |
|
| 42 | - $this->length( $length ); |
|
| 39 | + public function varchar(?int $length = null): Column { |
|
| 40 | + $this->type('varchar'); |
|
| 41 | + if (null !== $length) { |
|
| 42 | + $this->length($length); |
|
| 43 | 43 | } |
| 44 | 44 | return $this; |
| 45 | 45 | } |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | * @param int|null $length |
| 52 | 52 | * @return Column |
| 53 | 53 | */ |
| 54 | - public function text( ?int $length = null ): Column { |
|
| 55 | - $this->type( 'text' ); |
|
| 56 | - if ( null !== $length ) { |
|
| 57 | - $this->length( $length ); |
|
| 54 | + public function text(?int $length = null): Column { |
|
| 55 | + $this->type('text'); |
|
| 56 | + if (null !== $length) { |
|
| 57 | + $this->length($length); |
|
| 58 | 58 | } |
| 59 | 59 | return $this; |
| 60 | 60 | } |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | * @param int|null $length |
| 67 | 67 | * @return Column |
| 68 | 68 | */ |
| 69 | - public function int( ?int $length = null ): Column { |
|
| 70 | - $this->type( 'int' ); |
|
| 71 | - if ( null !== $length ) { |
|
| 72 | - $this->length( $length ); |
|
| 69 | + public function int(?int $length = null): Column { |
|
| 70 | + $this->type('int'); |
|
| 71 | + if (null !== $length) { |
|
| 72 | + $this->length($length); |
|
| 73 | 73 | } |
| 74 | 74 | return $this; |
| 75 | 75 | } |
@@ -82,13 +82,13 @@ discard block |
||
| 82 | 82 | * @param int|null $precision |
| 83 | 83 | * @return Column |
| 84 | 84 | */ |
| 85 | - public function float( ?int $length = null, ?int $precision = null ): Column { |
|
| 86 | - $this->type( 'float' ); |
|
| 87 | - if ( null !== $length ) { |
|
| 88 | - $this->length( $length ); |
|
| 85 | + public function float(?int $length = null, ?int $precision = null): Column { |
|
| 86 | + $this->type('float'); |
|
| 87 | + if (null !== $length) { |
|
| 88 | + $this->length($length); |
|
| 89 | 89 | } |
| 90 | - if ( null !== $precision ) { |
|
| 91 | - $this->precision( $precision ); |
|
| 90 | + if (null !== $precision) { |
|
| 91 | + $this->precision($precision); |
|
| 92 | 92 | } |
| 93 | 93 | return $this; |
| 94 | 94 | } |
@@ -101,13 +101,13 @@ discard block |
||
| 101 | 101 | * @param int|null $precision |
| 102 | 102 | * @return Column |
| 103 | 103 | */ |
| 104 | - public function double( ?int $length = null, ?int $precision = null ): Column { |
|
| 105 | - $this->type( 'double' ); |
|
| 106 | - if ( null !== $length ) { |
|
| 107 | - $this->length( $length ); |
|
| 104 | + public function double(?int $length = null, ?int $precision = null): Column { |
|
| 105 | + $this->type('double'); |
|
| 106 | + if (null !== $length) { |
|
| 107 | + $this->length($length); |
|
| 108 | 108 | } |
| 109 | - if ( null !== $precision ) { |
|
| 110 | - $this->precision( $precision ); |
|
| 109 | + if (null !== $precision) { |
|
| 110 | + $this->precision($precision); |
|
| 111 | 111 | } |
| 112 | 112 | return $this; |
| 113 | 113 | } |
@@ -119,10 +119,10 @@ discard block |
||
| 119 | 119 | * @param string|null $default |
| 120 | 120 | * @return Column |
| 121 | 121 | */ |
| 122 | - public function datetime( ?string $default = null ): Column { |
|
| 123 | - $this->type( 'datetime' ); |
|
| 124 | - if ( null !== $default ) { |
|
| 125 | - $this->default( $default ); |
|
| 122 | + public function datetime(?string $default = null): Column { |
|
| 123 | + $this->type('datetime'); |
|
| 124 | + if (null !== $default) { |
|
| 125 | + $this->default($default); |
|
| 126 | 126 | } |
| 127 | 127 | return $this; |
| 128 | 128 | } |
@@ -134,10 +134,10 @@ discard block |
||
| 134 | 134 | * @param string|null $default |
| 135 | 135 | * @return Column |
| 136 | 136 | */ |
| 137 | - public function timestamp( ?string $default = null ): Column { |
|
| 138 | - $this->type( 'timestamp' ); |
|
| 139 | - if ( null !== $default ) { |
|
| 140 | - $this->default( $default ); |
|
| 137 | + public function timestamp(?string $default = null): Column { |
|
| 138 | + $this->type('timestamp'); |
|
| 139 | + if (null !== $default) { |
|
| 140 | + $this->default($default); |
|
| 141 | 141 | } |
| 142 | 142 | return $this; |
| 143 | 143 | } |
@@ -149,11 +149,11 @@ discard block |
||
| 149 | 149 | * @param int|null $length |
| 150 | 150 | * @return Column |
| 151 | 151 | */ |
| 152 | - public function unsigned_int( ?int $length = null ): Column { |
|
| 153 | - $this->type( 'int' ); |
|
| 152 | + public function unsigned_int(?int $length = null): Column { |
|
| 153 | + $this->type('int'); |
|
| 154 | 154 | $this->unsigned(); |
| 155 | - if ( null !== $length ) { |
|
| 156 | - $this->length( $length ); |
|
| 155 | + if (null !== $length) { |
|
| 156 | + $this->length($length); |
|
| 157 | 157 | } |
| 158 | 158 | return $this; |
| 159 | 159 | } |
@@ -165,11 +165,11 @@ discard block |
||
| 165 | 165 | * @param int|null $length |
| 166 | 166 | * @return Column |
| 167 | 167 | */ |
| 168 | - public function unsigned_medium( ?int $length = null ): Column { |
|
| 169 | - $this->type( 'mediumint' ); |
|
| 168 | + public function unsigned_medium(?int $length = null): Column { |
|
| 169 | + $this->type('mediumint'); |
|
| 170 | 170 | $this->unsigned(); |
| 171 | - if ( null !== $length ) { |
|
| 172 | - $this->length( $length ); |
|
| 171 | + if (null !== $length) { |
|
| 172 | + $this->length($length); |
|
| 173 | 173 | } |
| 174 | 174 | return $this; |
| 175 | 175 | } |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | * @param int|null $length |
| 181 | 181 | * @return Column |
| 182 | 182 | */ |
| 183 | - public function unsigned_big( ?int $length = null ): Column { |
|
| 184 | - $this->type( 'bigint' ); |
|
| 183 | + public function unsigned_big(?int $length = null): Column { |
|
| 184 | + $this->type('bigint'); |
|
| 185 | 185 | $this->unsigned(); |
| 186 | - if ( null !== $length ) { |
|
| 187 | - $this->length( $length ); |
|
| 186 | + if (null !== $length) { |
|
| 187 | + $this->length($length); |
|
| 188 | 188 | } |
| 189 | 189 | return $this; |
| 190 | 190 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * @return Column |
| 197 | 197 | */ |
| 198 | 198 | public function json(): Column { |
| 199 | - $this->type( 'json' ); |
|
| 199 | + $this->type('json'); |
|
| 200 | 200 | return $this; |
| 201 | 201 | } |
| 202 | 202 | } |