Skip to content

Commit

Permalink
Use constant instead of string.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 11, 2024
1 parent 70ad4c8 commit 679ebe1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ORM/EagerLoader.php
Expand Up @@ -557,10 +557,9 @@ protected function _fixStrategies(): void
protected function _correctStrategy(EagerLoadable $loadable): void
{
$config = $loadable->getConfig();
$currentStrategy = $config['strategy'] ??
'join';
$currentStrategy = $config['strategy'] ?? Association::STRATEGY_JOIN;

if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
if (!$loadable->canBeJoined() || $currentStrategy !== Association::STRATEGY_JOIN) {
return;
}

Expand Down

0 comments on commit 679ebe1

Please sign in to comment.