Much stricter coding standards for phpstan, phpstan and psalm.

This commit is contained in:
2025-04-15 08:14:08 +00:00
parent 3c617e9869
commit b38a9656eb
63 changed files with 137 additions and 134 deletions

View File

@ -11,7 +11,7 @@ use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
use Exception;
// The whole purpose of this is to do a loop on the bottom
class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
final class IteratedTeamDifferencesInnerLayer extends TrueSkillFactorGraphLayer
{
public function __construct(
TrueSkillFactorGraph $parentGraph,

View File

@ -11,7 +11,7 @@ use DNW\Skills\TrueSkill\Factors\GaussianWeightedSumFactor;
use DNW\Skills\FactorGraphs\Variable;
use DNW\Skills\FactorGraphs\KeyedVariable;
class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLayer
final class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLayer
{
#[\Override]
public function buildLayer(): void
@ -51,7 +51,7 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
/**
* @param KeyedVariable[] $teamMembers
*/
protected function createPlayerToTeamSumFactor(array $teamMembers, Variable $sumVariable): GaussianWeightedSumFactor
private function createPlayerToTeamSumFactor(array $teamMembers, Variable $sumVariable): GaussianWeightedSumFactor
{
$weights = array_map(
static function ($v): float {

View File

@ -17,7 +17,7 @@ use DNW\Skills\FactorGraphs\ScheduleSequence;
// We intentionally have no Posterior schedule since the only purpose here is to
// start the process.
class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
final class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
{
/**
* @param Team[] $teams

View File

@ -11,7 +11,7 @@ use DNW\Skills\Numerics\BasicMath;
use DNW\Skills\TrueSkill\Factors\GaussianLikelihoodFactor;
use DNW\Skills\FactorGraphs\ScheduleSequence;
class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
final class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
{
#[\Override]
public function buildLayer(): void

View File

@ -9,7 +9,7 @@ use DNW\Skills\TrueSkill\Factors\GaussianGreaterThanFactor;
use DNW\Skills\TrueSkill\Factors\GaussianWithinFactor;
use DNW\Skills\TrueSkill\TrueSkillFactorGraph;
class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
final class TeamDifferencesComparisonLayer extends TrueSkillFactorGraphLayer
{
private readonly float $epsilon;

View File

@ -7,7 +7,7 @@ namespace DNW\Skills\TrueSkill\Layers;
use DNW\Skills\FactorGraphs\Variable;
use DNW\Skills\TrueSkill\Factors\GaussianWeightedSumFactor;
class TeamPerformancesToTeamPerformanceDifferencesLayer extends TrueSkillFactorGraphLayer
final class TeamPerformancesToTeamPerformanceDifferencesLayer extends TrueSkillFactorGraphLayer
{
#[\Override]
public function buildLayer(): void