mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-18 20:04:28 +00:00
More code standards
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill;
|
||||
|
||||
use DNW\Skills\Numerics\GaussianDistribution;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Factors;
|
||||
|
||||
use DNW\Skills\FactorGraphs\Message;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\FactorGraphs\ScheduleLoop;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\FactorGraphs\ScheduleStep;
|
||||
@ -87,7 +89,7 @@ class PlayerPerformancesToTeamPerformancesLayer extends TrueSkillFactorGraphLaye
|
||||
*/
|
||||
private function createOutputVariable(array $team): Variable
|
||||
{
|
||||
$memberNames = array_map(fn ($currentPlayer) => (string) ($currentPlayer->getKey()), $team);
|
||||
$memberNames = array_map(fn ($currentPlayer) => (string)($currentPlayer->getKey()), $team);
|
||||
|
||||
$teamMemberNames = \implode(', ', $memberNames);
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\FactorGraphs\ScheduleStep;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\FactorGraphs\KeyedVariable;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\TrueSkill\DrawMargin;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill\Layers;
|
||||
|
||||
use DNW\Skills\FactorGraphs\Variable;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill;
|
||||
|
||||
use DNW\Skills\FactorGraphs\FactorGraph;
|
||||
@ -60,11 +62,11 @@ class TrueSkillFactorGraph extends FactorGraph
|
||||
|
||||
public function buildGraph(): void
|
||||
{
|
||||
$lastOutput = null;
|
||||
$lastOutput = NULL;
|
||||
|
||||
$layers = $this->layers;
|
||||
foreach ($layers as $currentLayer) {
|
||||
if ($lastOutput != null) {
|
||||
if ($lastOutput != NULL) {
|
||||
$currentLayer->setInputVariablesGroups($lastOutput);
|
||||
}
|
||||
|
||||
@ -105,7 +107,7 @@ class TrueSkillFactorGraph extends FactorGraph
|
||||
$layers = $this->layers;
|
||||
foreach ($layers as $currentLayer) {
|
||||
$currentPriorSchedule = $currentLayer->createPriorSchedule();
|
||||
if ($currentPriorSchedule != null) {
|
||||
if ($currentPriorSchedule != NULL) {
|
||||
$fullSchedule[] = $currentPriorSchedule;
|
||||
}
|
||||
}
|
||||
@ -114,7 +116,7 @@ class TrueSkillFactorGraph extends FactorGraph
|
||||
|
||||
foreach ($allLayersReverse as $currentLayer) {
|
||||
$currentPosteriorSchedule = $currentLayer->createPosteriorSchedule();
|
||||
if ($currentPosteriorSchedule != null) {
|
||||
if ($currentPosteriorSchedule != NULL) {
|
||||
$fullSchedule[] = $currentPosteriorSchedule;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill;
|
||||
|
||||
use DNW\Skills\Numerics\GaussianDistribution;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill;
|
||||
|
||||
use DNW\Skills\GameInfo;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DNW\Skills\TrueSkill;
|
||||
|
||||
use DNW\Skills\GameInfo;
|
||||
|
Reference in New Issue
Block a user