Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 7, 2024
1 parent 340ef19 commit 6c8ca37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Extensions/MysqliQueryDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private function inferResultType(Expr $queryExpr, Scope $scope): ?Type
return null;
}

$resultObjectType = new MysqliResultObjectType(\mysqli_result::class);
$resultObjectType = new MysqliResultObjectType(\mysqli_result::class);
$resultObjectType->setRowType($resultType);

$objects[] = $resultObjectType;
Expand Down
6 changes: 3 additions & 3 deletions src/MysqliReflection/MysqliResultObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

namespace staabm\PHPStanDba\MysqliReflection;

use PHPStan\ShouldNotHappenException;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;

final class MysqliResultObjectType extends ObjectType
{
private ?Type $rowType;

public function setRowType(Type $rowType): void {
public function setRowType(Type $rowType): void
{
$this->rowType = $rowType;
}

public function getIterableValueType(): \PHPStan\Type\Type
{
if($this->rowType !== null) {
if ($this->rowType !== null) {
return $this->rowType;
}

Expand Down

0 comments on commit 6c8ca37

Please sign in to comment.