@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function __construct() |
| 23 | 23 | { |
| 24 | - $this->instances =& CacheManager::getInternalInstances(); |
|
| 24 | + $this->instances = & CacheManager::getInternalInstances(); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -29,22 +29,22 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | protected function getGenericCallback() |
| 31 | 31 | { |
| 32 | - return function($method, $args){ |
|
| 32 | + return function($method, $args) { |
|
| 33 | 33 | $getterMethod = (strpos($method, 'get') === 0); |
| 34 | 34 | $return = false; |
| 35 | 35 | |
| 36 | - if($getterMethod){ |
|
| 36 | + if ($getterMethod) { |
|
| 37 | 37 | $return = []; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach ($this->instances as $instance) |
| 41 | 41 | { |
| 42 | 42 | $reflectionMethod = new \ReflectionMethod(get_class($instance), $method); |
| 43 | - if($getterMethod){ |
|
| 44 | - $return[ $instance->getDriverName() ] = $reflectionMethod->invokeArgs($instance, $args); |
|
| 45 | - }else{ |
|
| 43 | + if ($getterMethod) { |
|
| 44 | + $return[$instance->getDriverName()] = $reflectionMethod->invokeArgs($instance, $args); |
|
| 45 | + } else { |
|
| 46 | 46 | $result = $reflectionMethod->invokeArgs($instance, $args); |
| 47 | - if($result !== false){ |
|
| 47 | + if ($result !== false) { |
|
| 48 | 48 | $return = $result; |
| 49 | 49 | } |
| 50 | 50 | } |