Removed redundant code in detachBehaviors()
@ -543,13 +543,10 @@ class Component extends Object
public function detachBehaviors()
{
$this->ensureBehaviors();
if ($this->_behaviors !== null) {
foreach ($this->_behaviors as $name => $behavior) {
$this->detachBehavior($name);
}
$this->_behaviors = [];
/**
* Makes sure that the behaviors declared in [[behaviors()]] are attached to this component.