Browse Source

Avoid unneeded "else".

ADmad 8 years ago
parent
commit
9a4776932f
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/ORM/Association/Loader/SelectLoader.php

+ 2 - 3
src/ORM/Association/Loader/SelectLoader.php

@@ -163,11 +163,10 @@ class SelectLoader
             $options['fields'] = [];
         }
 
+        $query = $finder();
         if (isset($options['finder'])) {
             list($finderName, $opts) = $this->_extractFinder($options['finder']);
-            $query = $finder()->find($finderName, $opts);
-        } else {
-            $query = $finder();
+            $query = $query->find($finderName, $opts);
         }
 
         $fetchQuery = $query