1212namespace StellarWP \Schema \Columns \Contracts ;
1313
1414use StellarWP \Schema \Traits \Indexable as Indexable_Trait ;
15+ use StellarWP \Schema \Columns \PHP_Types ;
16+ use StellarWP \Schema \Columns \Column_Types ;
1517use InvalidArgumentException ;
1618
1719/**
@@ -279,7 +281,7 @@ public function get_definition(): array {
279281
280282 if ( $ this ->get_default () ) {
281283 $ default = $ this ->get_default ();
282- $ sql .= ' DEFAULT ' . ( in_array ( $ default , self ::SQL_RESERVED_DEFAULTS , true ) || in_array ( $ this ->get_type (), [ self :: PHP_TYPE_INT , self :: PHP_TYPE_BOOL , self :: PHP_TYPE_FLOAT ], true ) ? $ default : "' {$ default }' " );
284+ $ sql .= ' DEFAULT ' . ( in_array ( $ default , self ::SQL_RESERVED_DEFAULTS , true ) || in_array ( $ this ->get_type (), [ PHP_Types:: INT , PHP_Types:: BOOL , PHP_Types:: FLOAT ], true ) ? $ default : "' {$ default }' " );
283285 }
284286
285287 if ( $ this ->get_on_update () ) {
@@ -308,7 +310,7 @@ public function get_definition(): array {
308310 * @return string[] The supported column types.
309311 */
310312 protected function get_supported_column_types (): array {
311- return self :: SUPPORTED_COLUMN_TYPES ;
313+ return Column_Types:: SUPPORTED ;
312314 }
313315
314316 /**
@@ -317,6 +319,6 @@ protected function get_supported_column_types(): array {
317319 * @return string[] The supported PHP types.
318320 */
319321 protected function get_supported_php_types (): array {
320- return self :: SUPPORTED_PHP_TYPES ;
322+ return PHP_Types:: SUPPORTED ;
321323 }
322324}
0 commit comments