diff --git a/src/Propel/Generator/Model/PropelTypes.php b/src/Propel/Generator/Model/PropelTypes.php index c7c96b2f5..276232a0e 100644 --- a/src/Propel/Generator/Model/PropelTypes.php +++ b/src/Propel/Generator/Model/PropelTypes.php @@ -555,7 +555,7 @@ public static function isTemporalType(string $type): bool self::TIMESTAMP, self::BU_DATE, self::BU_TIMESTAMP, - ]); + ], true); } /** @@ -579,7 +579,7 @@ public static function isTextType(string $mappingType): bool self::BU_DATE, self::BU_TIMESTAMP, self::JSON, - ]); + ], true); } /** @@ -601,7 +601,7 @@ public static function isNumericType(string $mappingType): bool self::NUMERIC, self::DECIMAL, self::REAL, - ]); + ], true); } /** @@ -613,7 +613,7 @@ public static function isNumericType(string $mappingType): bool */ public static function isBooleanType(string $mappingType): bool { - return in_array($mappingType, [self::BOOLEAN, self::BOOLEAN_EMU]); + return in_array($mappingType, [self::BOOLEAN, self::BOOLEAN_EMU], true); } /** @@ -625,7 +625,7 @@ public static function isBooleanType(string $mappingType): bool */ public static function isLobType(string $mappingType): bool { - return in_array($mappingType, [self::VARBINARY, self::LONGVARBINARY, self::BLOB, self::OBJECT, self::GEOMETRY]); + return in_array($mappingType, [self::VARBINARY, self::LONGVARBINARY, self::BLOB, self::OBJECT, self::GEOMETRY], true); } /** @@ -639,7 +639,7 @@ public static function isUuidType(string $type): bool { return in_array($type, [ self::UUID, - ]); + ], true); } /** @@ -651,7 +651,7 @@ public static function isUuidType(string $type): bool */ public static function isPhpPrimitiveType(string $phpType): bool { - return in_array($phpType, ['boolean', 'int', 'double', 'float', 'string']); + return in_array($phpType, ['boolean', 'int', 'double', 'float', 'string'], true); } /** @@ -663,7 +663,7 @@ public static function isPhpPrimitiveType(string $phpType): bool */ public static function isPhpPrimitiveNumericType(string $phpType): bool { - return in_array($phpType, ['boolean', 'int', 'double', 'float']); + return in_array($phpType, ['boolean', 'int', 'double', 'float'], true); } /** @@ -675,7 +675,7 @@ public static function isPhpPrimitiveNumericType(string $phpType): bool */ public static function isPhpObjectType(string $phpType): bool { - return !self::isPhpPrimitiveType($phpType) && !in_array($phpType, ['resource', 'array']); + return !self::isPhpPrimitiveType($phpType) && !in_array($phpType, ['resource', 'array'], true); } /** diff --git a/src/Propel/Generator/Platform/PgsqlPlatform.php b/src/Propel/Generator/Platform/PgsqlPlatform.php index 546151f39..fe1300664 100755 --- a/src/Propel/Generator/Platform/PgsqlPlatform.php +++ b/src/Propel/Generator/Platform/PgsqlPlatform.php @@ -583,7 +583,7 @@ public function supportsSchemas(): bool */ public function hasSize(string $sqlType): bool { - return !in_array($sqlType, ['BYTEA', 'TEXT', 'DOUBLE PRECISION']); + return !in_array(strtoupper($sqlType), ['BYTEA', 'TEXT', 'DOUBLE PRECISION'], true); } /** @@ -737,7 +737,7 @@ public function isUuid(string $type): bool { $strings = ['UUID']; - return in_array(strtoupper($type), $strings); + return in_array(strtoupper($type), $strings, true); } /** @@ -749,7 +749,7 @@ public function isString(string $type): bool { $strings = ['VARCHAR']; - return in_array(strtoupper($type), $strings); + return in_array(strtoupper($type), $strings, true); } /** @@ -761,7 +761,7 @@ public function isNumber(string $type): bool { $numbers = ['INTEGER', 'INT4', 'INT2', 'NUMBER', 'NUMERIC', 'SMALLINT', 'BIGINT', 'DECIMAL', 'REAL', 'DOUBLE PRECISION', 'SERIAL', 'BIGSERIAL']; - return in_array(strtoupper($type), $numbers); + return in_array(strtoupper($type), $numbers, true); } /**