Sub 200 warnings on static analysis

This commit is contained in:
2023-08-01 12:43:58 +00:00
parent b7322362bd
commit dc35035c3c
9 changed files with 20 additions and 20 deletions

View File

@ -15,7 +15,7 @@ class GaussianPriorFactor extends GaussianFactor
{
private $_newMessage;
public function __construct($mean, $variance, Variable $variable)
public function __construct(float $mean, float $variance, Variable $variable)
{
parent::__construct(sprintf('Prior value going to %s', $variable));
$this->_newMessage = new GaussianDistribution($mean, sqrt($variance));
@ -25,7 +25,7 @@ class GaussianPriorFactor extends GaussianFactor
$this->createVariableToMessageBindingWithMessage($variable, $newMessage);
}
protected function updateMessageVariable(Message $message, Variable $variable)
protected function updateMessageVariable(Message $message, Variable $variable): float
{
$oldMarginal = clone $variable->getValue();
$oldMessage = $message;