From 2f5c8fe2b4b5dd6e3154f9506b802d1f59ac0c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Liljenga=CC=8Ard?= Date: Tue, 31 May 2016 10:01:06 +0200 Subject: [PATCH] Removing unnecessary check for __toString() --- src/FactorGraphs/Factor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FactorGraphs/Factor.php b/src/FactorGraphs/Factor.php index 582ba21..c6cb6cf 100644 --- a/src/FactorGraphs/Factor.php +++ b/src/FactorGraphs/Factor.php @@ -19,7 +19,7 @@ protected function __construct($name) } /** - * @return The log-normalization constant of that factor + * @return mixed The log-normalization constant of that factor */ public function getLogNormalization() { @@ -27,7 +27,7 @@ public function getLogNormalization() } /** - * @return The number of messages that the factor has + * @return int The number of messages that the factor has */ public function getNumberOfMessages() { @@ -102,6 +102,6 @@ protected function createVariableToMessageBindingWithMessage(Variable $variable, public function __toString() { - return ($this->_name != null) ? $this->_name : null; + return $this->_name; } } \ No newline at end of file