Skip to content

Commit

Permalink
fix UndefinedClass on new $secondaryCriteriaClass()
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeyan committed Jun 23, 2021
1 parent 8fcceb4 commit 646931a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,6 @@
</InvalidReturnType>
</file>
<file src="src/Propel/Runtime/ActiveQuery/ModelCriteria.php">
<UndefinedClass occurrences="1">
<code>new $secondaryCriteriaClass()</code>
</UndefinedClass>
<UndefinedMethod occurrences="10">
<code>addSelectColumns</code>
<code>addSelfSelectColumns</code>
Expand Down
2 changes: 1 addition & 1 deletion src/Propel/Runtime/ActiveQuery/ModelCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ public function withColumn($clause, $name = null)
*
* @param string $relationName Relation name or alias
* @param string|null $secondaryCriteriaClass ClassName for the ModelCriteria to be used
* @psalm-param class-string<self>|null $secondaryCriteriaClass
*
* @throws \Propel\Runtime\Exception\PropelException
*
Expand All @@ -843,7 +844,6 @@ public function useQuery($relationName, $secondaryCriteriaClass = null)
/** @var \Propel\Runtime\ActiveQuery\ModelJoin $modelJoin */
$modelJoin = $this->joins[$relationName];
$className = $modelJoin->getTableMap()->getClassName();
/** @var self $secondaryCriteriaClass */
if ($secondaryCriteriaClass === null) {
$secondaryCriteria = PropelQuery::from($className);
} else {
Expand Down

0 comments on commit 646931a

Please sign in to comment.