diff --git a/src/Proxy/ProxyGenerator.php b/src/Proxy/ProxyGenerator.php index 5d5b67e38..8019d418f 100644 --- a/src/Proxy/ProxyGenerator.php +++ b/src/Proxy/ProxyGenerator.php @@ -940,7 +940,7 @@ private function generateMethods(ClassMetadata $class) if ($this->isShortIdentifierGetter($method, $class)) { $identifier = lcfirst(substr($name, 3)); $fieldType = $class->getTypeOfField($identifier); - $cast = in_array($fieldType, ['integer', 'smallint']) ? '(int) ' : ''; + $cast = in_array($fieldType, ['integer', 'smallint'], true) ? '(int) ' : ''; $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; $methods .= ' ';