Skip to content

Commit

Permalink
Rename 'finderName' option to 'finder'.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertpustulka committed Jul 21, 2015
1 parent 5468cdc commit 63b0355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ORM/Table.php
Expand Up @@ -1158,10 +1158,10 @@ public function get($primaryKey, $options = [])

$cacheConfig = isset($options['cache']) ? $options['cache'] : false;
$cacheKey = isset($options['key']) ? $options['key'] : false;
$finderName = isset($options['finderName']) ? $options['finderName'] : 'all';
unset($options['key'], $options['cache'], $options['finderName']);
$finder = isset($options['finder']) ? $options['finder'] : 'all';
unset($options['key'], $options['cache'], $options['finder']);

$query = $this->find($finderName, $options)->where($conditions);
$query = $this->find($finder, $options)->where($conditions);

if ($cacheConfig) {
if (!$cacheKey) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/TableTest.php
Expand Up @@ -3825,7 +3825,7 @@ public function testGet($options)
public function providerForTestGetWithCustomFinder()
{
return [
[ ['fields' => ['id'], 'finderName' => 'custom'] ]
[ ['fields' => ['id'], 'finder' => 'custom'] ]
];
}

Expand Down

0 comments on commit 63b0355

Please sign in to comment.