Bunch of generic code standard items. Will need a cleanup.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2024-02-02 15:16:11 +00:00
parent 3dddfc05db
commit c18ccd38e2
38 changed files with 117 additions and 26 deletions

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills;
/**
@ -26,7 +28,8 @@ class Player implements ISupportPartialPlay, ISupportPartialUpdate, \Stringable
private mixed $Id,
float $partialPlayPercentage = self::DEFAULT_PARTIAL_PLAY_PERCENTAGE,
float $partialUpdatePercentage = self::DEFAULT_PARTIAL_UPDATE_PERCENTAGE
) {
)
{
// If they don't want to give a player an id, that's ok...
Guard::argumentInRangeInclusive($partialPlayPercentage, 0.0, 1.0, 'partialPlayPercentage');
Guard::argumentInRangeInclusive($partialUpdatePercentage, 0, 1.0, 'partialUpdatePercentage');
@ -60,6 +63,6 @@ class Player implements ISupportPartialPlay, ISupportPartialUpdate, \Stringable
public function __toString(): string
{
return (string) $this->Id;
return (string)$this->Id;
}
}