@ -552,8 +552,7 @@ class Component extends BaseObject
return false;
}
if ($handler === null) {
unset($this->_events[$name]);
unset($this->_eventWildcards[$name]);
unset($this->_events[$name], $this->_eventWildcards[$name]);
return true;
@ -649,6 +649,8 @@ class Module extends ServiceLocator
/**
* Checks if class name or prefix is incorrect
*
* @param string $className
* @param string $prefix
* @return bool
@ -157,9 +157,7 @@ class CacheableWidgetBehavior extends Behavior
private function getCacheInstance()
{
$cacheInterface = 'yii\caching\CacheInterface';
$cache = Instance::ensure($this->cache, $cacheInterface);
return $cache;
return Instance::ensure($this->cache, $cacheInterface);