Upgrade with rector

This commit is contained in:
Alex Wulf
2022-07-05 16:21:06 +02:00
parent fd5d276359
commit 689e3b75fe
38 changed files with 144 additions and 355 deletions

View File

@ -2,18 +2,15 @@
namespace DNW\Skills\FactorGraphs;
class Variable
class Variable implements \Stringable
{
private $_name;
private $_prior;
private $_value;
public function __construct($name, $prior)
public function __construct($name, private $_prior)
{
$this->_name = 'Variable['.$name.']';
$this->_prior = $prior;
$this->resetToPrior();
}
@ -32,7 +29,7 @@ class Variable
$this->_value = $this->_prior;
}
public function __toString()
public function __toString(): string
{
return $this->_name;
}