More type checks

This commit is contained in:
2023-08-01 12:13:24 +00:00
parent 068b6f18aa
commit d5bba04f4f
15 changed files with 72 additions and 73 deletions

View File

@ -4,22 +4,22 @@ namespace DNW\Skills\FactorGraphs;
class Variable implements \Stringable
{
private $_name;
private string $_name;
private $_value;
private mixed $_value;
public function __construct($name, private $_prior)
public function __construct(string $name, private mixed $_prior)
{
$this->_name = 'Variable['.$name.']';
$this->resetToPrior();
}
public function getValue()
public function getValue(): mixed
{
return $this->_value;
}
public function setValue($value)
public function setValue(mixed $value): void
{
$this->_value = $value;
}