More types for static analysis

This commit is contained in:
2023-08-02 14:14:10 +00:00
parent a2c5252cf2
commit 4ddde1e277
7 changed files with 16 additions and 17 deletions

View File

@ -38,7 +38,7 @@ class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
$this->TeamDifferencesComparisonLayer->buildLayer();
}
public function createPriorSchedule(): ScheduleSequence
public function createPriorSchedule(): ?ScheduleSequence
{
switch (is_countable($this->getInputVariablesGroups()) ? count($this->getInputVariablesGroups()) : 0) {
case 0:
@ -78,7 +78,7 @@ class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
);
}
private function createTwoTeamInnerPriorLoopSchedule()
private function createTwoTeamInnerPriorLoopSchedule(): ScheduleSequence
{
$teamPerformancesToTeamPerformanceDifferencesLayerLocalFactors = $this->TeamPerformancesToTeamPerformanceDifferencesLayer->getLocalFactors();
$teamDifferencesComparisonLayerLocalFactors = $this->TeamDifferencesComparisonLayer->getLocalFactors();
@ -104,9 +104,9 @@ class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
);
}
private function createMultipleTeamInnerPriorLoopSchedule()
private function createMultipleTeamInnerPriorLoopSchedule(): ScheduleLoop
{
$totalTeamDifferences = is_countable($this->TeamPerformancesToTeamPerformanceDifferencesLayer->getLocalFactors()) ? count($this->TeamPerformancesToTeamPerformanceDifferencesLayer->getLocalFactors()) : 0;
$totalTeamDifferences = count($this->TeamPerformancesToTeamPerformanceDifferencesLayer->getLocalFactors());
$forwardScheduleList = [];

View File

@ -26,7 +26,7 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
}
}
public function createPriorSchedule(): ScheduleSequence
public function createPriorSchedule(): ?ScheduleSequence
{
$localFactors = $this->getLocalFactors();
@ -57,7 +57,7 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
);
}
public function createPosteriorSchedule(): ScheduleSequence
public function createPosteriorSchedule(): ?ScheduleSequence
{
$allFactors = [];
$localFactors = $this->getLocalFactors();

View File

@ -42,7 +42,7 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
}
}
public function createPriorSchedule(): ScheduleSequence
public function createPriorSchedule(): ?ScheduleSequence
{
$localFactors = $this->getLocalFactors();

View File

@ -45,7 +45,7 @@ class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
return $this->getParentFactorGraph()->getVariableFactory()->createKeyedVariable($key, $key . "'s performance");
}
public function createPriorSchedule(): ScheduleSequence
public function createPriorSchedule(): ?ScheduleSequence
{
$localFactors = $this->getLocalFactors();
@ -58,7 +58,7 @@ class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
);
}
public function createPosteriorSchedule(): ScheduleSequence
public function createPosteriorSchedule(): ?ScheduleSequence
{
$localFactors = $this->getLocalFactors();