Skip to content

Commit

Permalink
change to be the same as core Laravel code
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetry committed Feb 26, 2024
1 parent 74be444 commit 7de829c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/PostgresEnhancedConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,11 @@ public function serverVersion(): string
protected function getDefaultQueryGrammar(): QueryGrammar
{
$grammar = new QueryGrammar();
$grammar->setTablePrefix($this->tablePrefix);
if (method_exists($grammar, 'setConnection')) {
$grammar->setConnection($this);
}

return $grammar;
return $this->withTablePrefix($grammar);

Check failure on line 124 in src/PostgresEnhancedConnection.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Tpetry\PostgresqlEnhanced\PostgresEnhancedConnection::getDefaultQueryGrammar() should return Tpetry\PostgresqlEnhanced\Query\Grammar but returns Illuminate\Database\Grammar.
}

/**
Expand All @@ -131,12 +130,11 @@ protected function getDefaultQueryGrammar(): QueryGrammar
protected function getDefaultSchemaGrammar(): SchemaGrammar
{
$grammar = new SchemaGrammar();
$grammar->setTablePrefix($this->tablePrefix);
if (method_exists($grammar, 'setConnection')) {
$grammar->setConnection($this);
}

return $grammar;
return $this->withTablePrefix($grammar);

Check failure on line 137 in src/PostgresEnhancedConnection.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Tpetry\PostgresqlEnhanced\PostgresEnhancedConnection::getDefaultSchemaGrammar() should return Tpetry\PostgresqlEnhanced\Schema\Grammars\Grammar but returns Illuminate\Database\Grammar.
}

/**
Expand Down

0 comments on commit 7de829c

Please sign in to comment.