From 187e44d3bab78937b8cd141cd3036cdeab0bb059 Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Wed, 20 Jan 2016 10:37:48 +0300 Subject: [PATCH 1/2] Update phpDoc Component::getBehavior(). Added `@return null` --- framework/base/Component.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/Component.php b/framework/base/Component.php index da85049e8e..b5334665ab 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -552,7 +552,7 @@ class Component extends Object /** * Returns the named behavior object. * @param string $name the behavior name - * @return Behavior the behavior object, or null if the behavior does not exist + * @return null|Behavior the behavior object, or null if the behavior does not exist */ public function getBehavior($name) { From be4c9ae5b839a1c96edc3918967ea9eab30aacca Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Wed, 20 Jan 2016 10:44:14 +0300 Subject: [PATCH 2/2] it added also to detachBehavior() --- framework/base/Component.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/Component.php b/framework/base/Component.php index b5334665ab..a7721e1f06 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -610,7 +610,7 @@ class Component extends Object * Detaches a behavior from the component. * The behavior's [[Behavior::detach()]] method will be invoked. * @param string $name the behavior's name. - * @return Behavior the detached behavior. Null if the behavior does not exist. + * @return null|Behavior the detached behavior. Null if the behavior does not exist. */ public function detachBehavior($name) {