Skip to content

Commit

Permalink
Fix PHPStan level-5 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mibk committed Nov 18, 2020
1 parent c0d1403 commit 816acd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion LeanMapperQuery/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ public static function queryEntityProperty(LeanMapper\Entity $entity, $field, IQ
if ($row !== null && $targetResultProxy === null) {
$targetResultProxy = $row->getResultProxy();
}
$row !== null && $resultRows[$row->{$targetPrimaryKey}] = $row;
if ($row !== null) {
$resultRows[$row->{$targetPrimaryKey}] = $row;
}
}

if ($targetResultProxy) {
Expand Down
2 changes: 1 addition & 1 deletion LeanMapperQuery/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private function traverseToRelatedEntity(&$currentTable, &$currentTableAlias, Pr
$targetTableAlias = $this->joinRelatedTable($relationshipTableAlias, $targetReferencingColumn, $targetTable, $targetTablePrimaryKey, $implicitFilters, false);

} else {
throw new InvalidRelationshipException('Unknown relationship type. ' . get_class($relationship) . ' given.');
throw new InvalidRelationshipException('Unknown relationship type in property {$property->getName()}.');
}
$currentTable = $targetTable;
$currentTableAlias = $targetTableAlias;
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 3
level: 5
paths:
- LeanMapperQuery/

0 comments on commit 816acd2

Please sign in to comment.