title: Why PHPStan dectects these errors?
body: <p>I use LARAVEL 9 and PHPSTAN</p>
  <p>I have this simple test method :</p>
  <pre><code>public function createAndAuthenticatedAnUser(string $status = 'VALIDATED', bool $isAdmin = false): User
  {
      $user = User::factory()-&gt;create([
          'status' =&gt; $status,
          'is_admin' =&gt; $isAdmin
      ])-&gt;first();
      $this-&gt;actingAs($user);
      return $user;
  }
  </code></pre>
  <p>When I run PHPSTAN, I have these errors :</p>
  <pre><code>     40     Parameter #1 $user of method Illuminate\Foundation\Testing\TestCase::actingAs() expects
           Illuminate\Contracts\Auth\Authenticatable, Illuminate\Database\Eloquent\Model|null given.
    41     Method Tests\Feature\ValidateRegistrationTest::createAndAuthenticatedAnUser() should return App\Models\User
           but returns Illuminate\Database\Eloquent\Model|null.
  </code></pre>
  <p>For the 1st error : The <strong>actingAs</strong> expects an User, it is the case.</p>
  <p>For the 2nd error : The function returns an User (which extends <strong>Authenticatable</strong>)</p>
  <p>What can be wrong in this code for PHPSTAN ?</p>