From c56867592bb6c088e40634db4670a76f5d3b4c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Mon, 10 Oct 2022 10:12:57 +0200 Subject: [PATCH] Add missing strict parameter to in_array --- src/Proxy/ProxyGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 .= ' ';