Skip to content

Commit 596507c

Browse files
committed
notice
1 parent 0efc1f9 commit 596507c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Model/Behavior/FetchableBehavior.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ class FetchableBehavior extends Behavior
3131
*/
3232
public function initialize(array $config)
3333
{
34+
// key is set automatically
35+
if (!isset($config['key'])) {
36+
$config['key'] = 'Fetchable.' . $this->_table->getAlias();
37+
}
38+
3439
// key can be callable
3540
if (\is_callable($config['key'])) {
3641
$config['key'] = $config['key']($this->_table->getAlias());
3742
}
3843

39-
// key is set automatically
40-
if (!$config['key']) {
41-
$config['key'] = 'Fetchable.' . $this->_table->getAlias();
42-
}
43-
4444
$this->setConfig('key', $config['key']);
4545
}
4646

0 commit comments

Comments
 (0)