Skip to content

Commit

Permalink
fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Sep 27, 2023
1 parent 3e9628e commit 2ab49b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pagination/PaginationManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use GraphQL\Language\AST\NonNullTypeNode;
use GraphQL\Language\AST\ObjectTypeDefinitionNode;
use GraphQL\Language\Parser;
use Illuminate\Container\Container;
use Nuwave\Lighthouse\CacheControl\CacheControlServiceProvider;
use Nuwave\Lighthouse\Exceptions\DefinitionException;
use Nuwave\Lighthouse\Schema\AST\ASTHelper;
Expand Down Expand Up @@ -366,7 +365,8 @@ protected static function pageInfo(): ObjectTypeDefinitionNode
*/
private function maybeInheritCacheControlDirective(): string
{
if (Container::getInstance()->providerIsLoaded(CacheControlServiceProvider::class)) {
// Not using Illuminate\Container\Container::getInstance() here as it causes PHPStan issues
if (app()->providerIsLoaded(CacheControlServiceProvider::class)) {
return /** @lang GraphQL */ '@cacheControl(inheritMaxAge: true)';
}

Expand Down

0 comments on commit 2ab49b0

Please sign in to comment.