Skip to content
Permalink
Browse files

Shorten behavior methods.

Use 5.4 features to make methods shorter. Stop accessing _config
directly and instead use the getter method. If anyone modifies the
behavior of config() we should respect those changes.
  • Loading branch information...
markstory committed Aug 28, 2014
1 parent 82ddbcf commit 0fa5a8428bbe232dea75f595019f52280c702aa1
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/ORM/Behavior.php
@@ -212,12 +212,12 @@ public function implementedEvents() {
* @return array
*/
public function implementedFinders() {
if (isset($this->_config['implementedFinders'])) {
return $this->_config['implementedFinders'];
$methods = $this->config('implementedFinders');
if (isset($methods)) {
return $methods;
}
$reflectionMethods = $this->_reflectionCache();
return $reflectionMethods['finders'];
return $this->_reflectionCache()['finders'];
}
/**
@@ -242,12 +242,12 @@ public function implementedFinders() {
* @return array
*/
public function implementedMethods() {
if (isset($this->_config['implementedMethods'])) {
return $this->_config['implementedMethods'];
$methods = $this->config('implementedMethods');
if (isset($methods)) {
return $methods;
}
$reflectionMethods = $this->_reflectionCache();
return $reflectionMethods['methods'];
return $this->_reflectionCache()['methods'];
}
/**

0 comments on commit 0fa5a84

Please sign in to comment.
You can’t perform that action at this time.