Skip to content

Commit

Permalink
chore: update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
canvural committed Nov 26, 2024
1 parent 4f97683 commit a677364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Rules/NoUnnecessaryCollectionCallRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleError;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\MixedType;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use stdClass;

use function array_diff;
use function array_map;
Expand Down Expand Up @@ -225,7 +225,7 @@ protected function firstArgIsDatabaseColumn(Node\Expr\StaticCall|MethodCall $nod

$iterableType = $scope->getType($node->var)->getIterableValueType();

if ((new ObjectType(\stdClass::class))->isSuperTypeOf($iterableType)->yes()) {
if ((new ObjectType(stdClass::class))->isSuperTypeOf($iterableType)->yes()) {
$previousCall = $node->var;
if ($previousCall instanceof MethodCall) {
$queryBuilderType = $scope->getType($previousCall->var);
Expand Down
10 changes: 9 additions & 1 deletion stubs/common/QueryBuilder.stub
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,18 @@ class Builder
/**
* Get a lazy collection for the given query.
*
* @return \Illuminate\Support\LazyCollection<int, mixed>
* @return \Illuminate\Support\LazyCollection<int, \stdClass>
*/
public function cursor();

/**
* Execute the query as a "select" statement.
*
* @param string[]|string $columns
* @return \Illuminate\Support\Collection<int, \stdClass>
*/
public function get($columns = ['*']);

/**
* Get an array with the values of a given column.
*
Expand Down

0 comments on commit a677364

Please sign in to comment.