Permalink
Browse files

Bug fix for resource class methods without annotations destroying the…

… $params variable in parseConfig()
  • Loading branch information...
1 parent d030e9d commit 3cdcb8109fded786bd6678fcc2f7e142b619251a @thizzle committed Feb 22, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Sonno/Configuration/Driver/AnnotationDriver.php
@@ -170,13 +170,13 @@ public function parseConfig()
$config = $this->getConfig();
foreach ($resources as $resourceClass) {
- $class = new ReflectionClass($resourceClass);
- $classParams = $this->_extractClassParams($class, $reader);
+ $class = new ReflectionClass($resourceClass);
+ $params = $this->_extractClassParams($class, $reader);
$properties = $class->getProperties();
foreach ($properties as $property) {
// Class and property params don't overlap, just merge.
- $classParams = array_merge_recursive(
+ $params = array_merge_recursive(
$classParams,
$this->_extractPropertyParams($property, $reader)
);
@@ -186,7 +186,7 @@ public function parseConfig()
foreach ($methods as $method) {
// Class and method params don't overlap either, just merge.
$params = array_merge(
- $classParams,
+ $params,
$this->_extractMethodParams($method, $reader)
);

0 comments on commit 3cdcb81

Please sign in to comment.