@@ -1160,7 +1160,7 @@ public function addJsonAccessorOpen(string &$script, Column $column): void
11601160 $ script .= "
11611161 " . $ visibility . " function get $ cfc( \$asArray = true " ;
11621162 if ($ column ->isLazyLoad ()) {
1163- $ script .= ', ConnectionInterface $con = null ' ;
1163+ $ script .= ', ? ConnectionInterface $con = null ' ;
11641164 }
11651165
11661166 $ script .= ")
@@ -1278,7 +1278,7 @@ public function addBooleanAccessorOpen(string &$script, Column $column): void
12781278 $ script .= "
12791279 " . $ visibility . " function $ name( " ;
12801280 if ($ column ->isLazyLoad ()) {
1281- $ script .= 'ConnectionInterface $con = null ' ;
1281+ $ script .= '? ConnectionInterface $con = null ' ;
12821282 }
12831283
12841284 $ script .= ")
@@ -1483,7 +1483,7 @@ protected function addHasArrayElement(string &$script, Column $column): void
14831483 */
14841484 $ visibility function has $ singularPhpName( \$value " ;
14851485 if ($ column ->isLazyLoad ()) {
1486- $ script .= ', ConnectionInterface $con = null ' ;
1486+ $ script .= ', ? ConnectionInterface $con = null ' ;
14871487 }
14881488
14891489 $ script .= "): bool
@@ -1557,7 +1557,7 @@ public function addDefaultAccessorOpen(string &$script, Column $column): void
15571557 $ script .= "
15581558 " . $ visibility . " function get $ cfc( " ;
15591559 if ($ column ->isLazyLoad ()) {
1560- $ script .= 'ConnectionInterface $con = null ' ;
1560+ $ script .= '? ConnectionInterface $con = null ' ;
15611561 }
15621562
15631563 $ script .= ")
@@ -1852,6 +1852,7 @@ public function addMutatorOpenOpen(string &$script, Column $column): void
18521852 $ typeHint .= ' ' ;
18531853
18541854 if (!$ column ->isNotNull ()) {
1855+ $ typeHint = '? ' . $ typeHint ;
18551856 $ null = ' = null ' ;
18561857 }
18571858 }
@@ -2206,7 +2207,7 @@ protected function addAddArrayElement(string &$script, Column $col): void
22062207 */
22072208 $ visibility function add $ singularPhpName( \$value " ;
22082209 if ($ col ->isLazyLoad ()) {
2209- $ script .= ', ConnectionInterface $con = null ' ;
2210+ $ script .= ', ? ConnectionInterface $con = null ' ;
22102211 }
22112212
22122213 $ script .= ")
@@ -2254,7 +2255,7 @@ protected function addRemoveArrayElement(string &$script, Column $col): void
22542255 */
22552256 $ visibility function remove $ singularPhpName( \$value " ;
22562257 if ($ col ->isLazyLoad ()) {
2257- $ script .= ', ConnectionInterface $con = null ' ;
2258+ $ script .= ', ? ConnectionInterface $con = null ' ;
22582259 }
22592260 // we want to reindex the array, so array_ functions are not the best choice
22602261 $ script .= ")
@@ -4141,7 +4142,7 @@ protected function addFKMutator(string &$script, ForeignKey $fk): void
41414142 * @return \$this The current object (for fluent API support)
41424143 * @throws \Propel\Runtime\Exception\PropelException
41434144 */
4144- public function set " . $ this ->getFKPhpNameAffix ($ fk , false ) . "( $ className \$v = null)
4145+ public function set " . $ this ->getFKPhpNameAffix ($ fk , false ) . "(? $ className \$v = null)
41454146 { " ;
41464147
41474148 foreach ($ fk ->getMapping () as $ map ) {
@@ -4958,11 +4959,11 @@ protected function addPKRefFKSet(string &$script, ForeignKey $refFK): void
49584959 /**
49594960 * Sets a single $ className object as related to this object by a one-to-one relationship.
49604961 *
4961- * @param $ className \$v $ className
4962+ * @param $ className|null \$v $ className
49624963 * @return \$this The current object (for fluent API support)
49634964 * @throws \Propel\Runtime\Exception\PropelException
49644965 */
4965- public function set " . $ this ->getRefFKPhpNameAffix ($ refFK , false ) . "( $ className \$v = null)
4966+ public function set " . $ this ->getRefFKPhpNameAffix ($ refFK , false ) . "(? $ className \$v = null)
49664967 {
49674968 \$this-> $ varName = \$v;
49684969
0 commit comments