mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 20:34:28 +00:00
More return types. Basic example
This commit is contained in:
@ -10,7 +10,7 @@ abstract class Factor implements \Stringable
|
||||
{
|
||||
private array $messages = [];
|
||||
|
||||
private $messageToVariableBinding;
|
||||
private HashMap $messageToVariableBinding;
|
||||
|
||||
private string $name;
|
||||
|
||||
|
@ -4,14 +4,14 @@ namespace DNW\Skills\FactorGraphs;
|
||||
|
||||
class FactorGraph
|
||||
{
|
||||
private $variableFactory;
|
||||
private VariableFactory $variableFactory;
|
||||
|
||||
public function getVariableFactory()
|
||||
public function getVariableFactory(): VariableFactory
|
||||
{
|
||||
return $this->variableFactory;
|
||||
}
|
||||
|
||||
public function setVariableFactory(VariableFactory $factory)
|
||||
public function setVariableFactory(VariableFactory $factory): void
|
||||
{
|
||||
$this->variableFactory = $factory;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ namespace DNW\Skills\FactorGraphs;
|
||||
|
||||
abstract class Schedule implements \Stringable
|
||||
{
|
||||
protected function __construct(private $_name)
|
||||
protected function __construct(private string $name)
|
||||
{
|
||||
}
|
||||
|
||||
@ -12,6 +12,6 @@ abstract class Schedule implements \Stringable
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string) $this->_name;
|
||||
return (string) $this->name;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user