Skip to content

Commit

Permalink
Removing unnecessary check for __toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
Zn4rK committed May 31, 2016
1 parent 14401b3 commit 2f5c8fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FactorGraphs/Factor.php
Expand Up @@ -19,15 +19,15 @@ protected function __construct($name)
}

/**
* @return The log-normalization constant of that factor
* @return mixed The log-normalization constant of that factor
*/
public function getLogNormalization()
{
return 0;
}

/**
* @return The number of messages that the factor has
* @return int The number of messages that the factor has
*/
public function getNumberOfMessages()
{
Expand Down Expand Up @@ -102,6 +102,6 @@ protected function createVariableToMessageBindingWithMessage(Variable $variable,

public function __toString()
{
return ($this->_name != null) ? $this->_name : null;
return $this->_name;
}
}

0 comments on commit 2f5c8fe

Please sign in to comment.