Skip to content

Commit f43bd69

Browse files
committed
add strict nullable types to QueryBuilder
1 parent ab6d5d1 commit f43bd69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Propel/Generator/Builder/Om/QueryBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ protected function addConstructorOpen(string &$script): void
377377
{
378378
$table = $this->getTable();
379379
$script .= "
380-
public function __construct(\$dbName = '" . $table->getDatabase()->getName() . "', \$modelName = '" . addslashes($this->getNewStubObjectBuilder($table)->getFullyQualifiedClassName()) . "', \$modelAlias = null)
380+
public function __construct(\$dbName = '" . $table->getDatabase()->getName() . "', \$modelName = '" . addslashes($this->getNewStubObjectBuilder($table)->getFullyQualifiedClassName()) . "', ?string \$modelAlias = null)
381381
{";
382382
}
383383

@@ -1190,7 +1190,7 @@ protected function addFilterByArrayCol(string &$script, Column $col): void
11901190
*
11911191
* @return \$this The current query, for fluid interface
11921192
*/
1193-
public function filterBy$singularPhpName(\$$variableName = null, ?string \$comparison = null)
1193+
public function filterBy$singularPhpName(mixed \$$variableName = null, ?string \$comparison = null)
11941194
{
11951195
if (null === \$comparison || \$comparison == Criteria::CONTAINS_ALL) {
11961196
if (is_scalar(\$$variableName)) {
@@ -1240,7 +1240,7 @@ protected function addFilterBySetCol(string &$script, Column $col): void
12401240
*
12411241
* @return \$this The current query, for fluid interface
12421242
*/
1243-
public function filterBy$singularPhpName(\$$variableName = null, ?string \$comparison = null)
1243+
public function filterBy$singularPhpName(mixed \$$variableName = null, ?string \$comparison = null)
12441244
{
12451245
\$this->filterBy$colPhpName(\$$variableName, \$comparison);
12461246
@@ -1567,7 +1567,7 @@ protected function addUseRelatedQuery(string &$script, Table $fkTable, string $q
15671567
*
15681568
* @return $queryClass A secondary query class using the current class as primary query
15691569
*/
1570-
public function use" . $relationName . 'Query($relationAlias = null, $joinType = ' . $joinType . ")
1570+
public function use" . $relationName . 'Query(?string $relationAlias = null, string $joinType = ' . $joinType . ")
15711571
{
15721572
return \$this
15731573
->join" . $relationName . "(\$relationAlias, \$joinType)

0 commit comments

Comments
 (0)