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

@ -4,22 +4,15 @@ namespace DNW\Skills\FactorGraphs;
class ScheduleStep extends Schedule
{
private $_factor;
private $_index;
public function __construct($name, Factor $factor, $index)
public function __construct($name, private readonly Factor $_factor, private $_index)
{
parent::__construct($name);
$this->_factor = $factor;
$this->_index = $index;
}
public function visit($depth = -1, $maxDepth = 0)
{
$currentFactor = $this->_factor;
$delta = $currentFactor->updateMessageIndex($this->_index);
return $delta;
return $currentFactor->updateMessageIndex($this->_index);
}
}