@@ -1161,7 +1161,7 @@ public function addJsonAccessorOpen(string &$script, Column $column): void
11611161 $ script .= "
11621162 " . $ visibility . " function get $ cfc( \$asArray = true " ;
11631163 if ($ column ->isLazyLoad ()) {
1164- $ script .= ', ConnectionInterface $con = null ' ;
1164+ $ script .= ', ? ConnectionInterface $con = null ' ;
11651165 }
11661166
11671167 $ script .= ")
@@ -1279,7 +1279,7 @@ public function addBooleanAccessorOpen(string &$script, Column $column): void
12791279 $ script .= "
12801280 " . $ visibility . " function $ name( " ;
12811281 if ($ column ->isLazyLoad ()) {
1282- $ script .= 'ConnectionInterface $con = null ' ;
1282+ $ script .= '? ConnectionInterface $con = null ' ;
12831283 }
12841284
12851285 $ script .= ")
@@ -1484,7 +1484,7 @@ protected function addHasArrayElement(string &$script, Column $column): void
14841484 */
14851485 $ visibility function has $ singularPhpName( \$value " ;
14861486 if ($ column ->isLazyLoad ()) {
1487- $ script .= ', ConnectionInterface $con = null ' ;
1487+ $ script .= ', ? ConnectionInterface $con = null ' ;
14881488 }
14891489
14901490 $ script .= "): bool
@@ -1558,7 +1558,7 @@ public function addDefaultAccessorOpen(string &$script, Column $column): void
15581558 $ script .= "
15591559 " . $ visibility . " function get $ cfc( " ;
15601560 if ($ column ->isLazyLoad ()) {
1561- $ script .= 'ConnectionInterface $con = null ' ;
1561+ $ script .= '? ConnectionInterface $con = null ' ;
15621562 }
15631563
15641564 $ script .= ")
@@ -1855,6 +1855,7 @@ public function addMutatorOpenOpen(string &$script, Column $column): void
18551855 $ typeHint .= ' ' ;
18561856
18571857 if (!$ column ->isNotNull ()) {
1858+ $ typeHint = '? ' . $ typeHint ;
18581859 $ null = ' = null ' ;
18591860 }
18601861 }
@@ -2209,7 +2210,7 @@ protected function addAddArrayElement(string &$script, Column $col): void
22092210 */
22102211 $ visibility function add $ singularPhpName( \$value " ;
22112212 if ($ col ->isLazyLoad ()) {
2212- $ script .= ', ConnectionInterface $con = null ' ;
2213+ $ script .= ', ? ConnectionInterface $con = null ' ;
22132214 }
22142215
22152216 $ script .= ")
@@ -2257,7 +2258,7 @@ protected function addRemoveArrayElement(string &$script, Column $col): void
22572258 */
22582259 $ visibility function remove $ singularPhpName( \$value " ;
22592260 if ($ col ->isLazyLoad ()) {
2260- $ script .= ', ConnectionInterface $con = null ' ;
2261+ $ script .= ', ? ConnectionInterface $con = null ' ;
22612262 }
22622263 // we want to reindex the array, so array_ functions are not the best choice
22632264 $ script .= ")
@@ -4033,7 +4034,7 @@ protected function addFKMutator(string &$script, ForeignKey $fk): void
40334034 * @return \$this The current object (for fluent API support)
40344035 * @throws \Propel\Runtime\Exception\PropelException
40354036 */
4036- public function set " . $ this ->getFKPhpNameAffix ($ fk , false ) . "( $ className \$v = null)
4037+ public function set " . $ this ->getFKPhpNameAffix ($ fk , false ) . "(? $ className \$v = null)
40374038 { " ;
40384039
40394040 foreach ($ fk ->getMapping () as $ map ) {
@@ -4850,11 +4851,11 @@ protected function addPKRefFKSet(string &$script, ForeignKey $refFK): void
48504851 /**
48514852 * Sets a single $ className object as related to this object by a one-to-one relationship.
48524853 *
4853- * @param $ className \$v $ className
4854+ * @param $ className|null \$v $ className
48544855 * @return \$this The current object (for fluent API support)
48554856 * @throws \Propel\Runtime\Exception\PropelException
48564857 */
4857- public function set " . $ this ->getRefFKPhpNameAffix ($ refFK , false ) . "( $ className \$v = null)
4858+ public function set " . $ this ->getRefFKPhpNameAffix ($ refFK , false ) . "(? $ className \$v = null)
48584859 {
48594860 \$this-> $ varName = \$v;
48604861
0 commit comments