Skip to content

Commit

Permalink
Minor corrections/simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Nov 10, 2013
1 parent 59917eb commit 470d671
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Cake/ORM/Behavior.php
Expand Up @@ -92,7 +92,7 @@
class Behavior implements EventListener {

/**
* _reflectionMethods
* A cache of the methods provided by this class
*
* @var array
*/
Expand Down Expand Up @@ -207,7 +207,7 @@ protected function _reflectionMethods() {
$events = $this->implementedEvents();
$eventMethods = [];
foreach ($events as $e => $binding) {
if (is_array($binding) && isset($binding['callable']) && isset($binding['callable'])) {
if (is_array($binding) && isset($binding['callable'])) {
$binding = $binding['callable'];
}
$eventMethods[$binding] = true;
Expand All @@ -231,8 +231,7 @@ protected function _reflectionMethods() {
}
$methodName = strtolower($methodName);

$isFinder = substr($methodName, 0, 4) === 'find';
if ($isFinder) {
if (substr($methodName, 0, 4) === 'find') {
$return['finders'][substr($methodName, 4)] = $methodName;
} else {
$return['methods'][$methodName] = $methodName;
Expand Down

0 comments on commit 470d671

Please sign in to comment.