More return types. Basic example

This commit is contained in:
2023-08-02 09:04:56 +00:00
parent f0aa9413e1
commit 32b8a9d83e
13 changed files with 71 additions and 33 deletions

View File

@ -10,7 +10,7 @@ use DNW\Skills\FactorGraphs\ScheduleSequence;
class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
{
public function buildLayer()
public function buildLayer(): void
{
$inputVariablesGroups = $this->getInputVariablesGroups();
$outputVariablesGroups = &$this->getOutputVariablesGroups();

View File

@ -9,7 +9,7 @@ use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
{
private $epsilon;
private float $epsilon;
public function __construct(TrueSkillFactorGraph $parentGraph, private readonly array $teamRanks)
{
@ -18,7 +18,7 @@ class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
$this->epsilon = DrawMargin::getDrawMarginFromDrawProbability($gameInfo->getDrawProbability(), $gameInfo->getBeta());
}
public function buildLayer()
public function buildLayer(): void
{
$inputVarGroups = $this->getInputVariablesGroups();
$inputVarGroupsCount = is_countable($inputVarGroups) ? count($inputVarGroups) : 0;