Compare commits

..

No commits in common. "4c8e1fcb1bec9cc750fe8593a03c9c3a69e5d37a" and "ec000870259c62a4c3ba66362c7b957a3290a9ae" have entirely different histories.

8 changed files with 62 additions and 69 deletions

@ -32,13 +32,13 @@
"phplint", "phplint",
"phpcs" "phpcs"
], ],
"analyze": [ "static": [
"@analyze-phpstan", "@analyze-phpstan",
"@analyze-psalm", "@analyze-psalm",
"@analyze-rector" "@analyze-rector"
], ],
"analyze-phpstan":"vendor/bin/phpstan analyze --error-format=raw", "analyze-phpstan":"vendor/bin/phpstan analyze --error-format=raw",
"analyze-psalm": "vendor/bin/psalm --no-cache --show-info=true", "analyze-psalm": "vendor/bin/psalm --no-cache",
"analyze-rector": "vendor/bin/rector --dry-run", "analyze-rector": "vendor/bin/rector --dry-run",
"html": [ "html": [
"pandoc -s README.md -o output/README.html", "pandoc -s README.md -o output/README.html",
@ -49,7 +49,7 @@
"@document", "@document",
"@benchmark", "@benchmark",
"@lint", "@lint",
"@analyze", "@static",
"@html" "@html"
] ]
} }

108
composer.lock generated

@ -878,21 +878,20 @@
}, },
{ {
"name": "phar-io/manifest", "name": "phar-io/manifest",
"version": "2.0.4", "version": "2.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phar-io/manifest.git", "url": "https://github.com/phar-io/manifest.git",
"reference": "54750ef60c58e43759730615a392c31c80e23176" "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
"reference": "54750ef60c58e43759730615a392c31c80e23176", "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*",
"ext-phar": "*", "ext-phar": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"phar-io/version": "^3.0.1", "phar-io/version": "^3.0.1",
@ -933,15 +932,9 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": { "support": {
"issues": "https://github.com/phar-io/manifest/issues", "issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/2.0.4" "source": "https://github.com/phar-io/manifest/tree/2.0.3"
}, },
"funding": [ "time": "2021-07-20T11:28:43+00:00"
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2024-03-03T12:33:53+00:00"
}, },
{ {
"name": "phar-io/version", "name": "phar-io/version",
@ -1349,16 +1342,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "10.1.12", "version": "10.1.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63" "reference": "78c3b7625965c2513ee96569a4dbb62601784145"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/842f72662d6b9edda84c4b6f13885fd9cd53dc63", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145",
"reference": "842f72662d6b9edda84c4b6f13885fd9cd53dc63", "reference": "78c3b7625965c2513ee96569a4dbb62601784145",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1415,7 +1408,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.12" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.11"
}, },
"funding": [ "funding": [
{ {
@ -1423,7 +1416,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-02T07:22:05+00:00" "time": "2023-12-21T15:38:30+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -1934,16 +1927,16 @@
}, },
{ {
"name": "rector/rector", "name": "rector/rector",
"version": "1.0.2", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/rectorphp/rector.git", "url": "https://github.com/rectorphp/rector.git",
"reference": "7596fa6da06c6a20c012efe6bb3d9188a9113b11" "reference": "258b775511e62a7188f8ce114d44acaf244d9a7d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/7596fa6da06c6a20c012efe6bb3d9188a9113b11", "url": "https://api.github.com/repos/rectorphp/rector/zipball/258b775511e62a7188f8ce114d44acaf244d9a7d",
"reference": "7596fa6da06c6a20c012efe6bb3d9188a9113b11", "reference": "258b775511e62a7188f8ce114d44acaf244d9a7d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1978,7 +1971,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/rectorphp/rector/issues", "issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/1.0.2" "source": "https://github.com/rectorphp/rector/tree/1.0.1"
}, },
"funding": [ "funding": [
{ {
@ -1986,20 +1979,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-03T12:32:31+00:00" "time": "2024-02-16T07:53:23+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
"version": "2.0.1", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git", "url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae",
"reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2034,8 +2027,7 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser", "homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues", "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"security": "https://github.com/sebastianbergmann/cli-parser/security/policy", "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0"
"source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1"
}, },
"funding": [ "funding": [
{ {
@ -2043,7 +2035,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-02T07:12:49+00:00" "time": "2023-02-03T06:58:15+00:00"
}, },
{ {
"name": "sebastian/code-unit", "name": "sebastian/code-unit",
@ -2293,16 +2285,16 @@
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "5.1.1", "version": "5.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f",
"reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2310,7 +2302,7 @@
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.0", "phpunit/phpunit": "^10.0",
"symfony/process": "^6.4" "symfony/process": "^4.2 || ^5"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -2348,7 +2340,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/diff/issues", "issues": "https://github.com/sebastianbergmann/diff/issues",
"security": "https://github.com/sebastianbergmann/diff/security/policy", "security": "https://github.com/sebastianbergmann/diff/security/policy",
"source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" "source": "https://github.com/sebastianbergmann/diff/tree/5.1.0"
}, },
"funding": [ "funding": [
{ {
@ -2356,7 +2348,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-02T07:15:17+00:00" "time": "2023-12-22T10:55:06+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -2424,16 +2416,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "5.1.2", "version": "5.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "955288482d97c19a372d3f31006ab3f37da47adf" "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc",
"reference": "955288482d97c19a372d3f31006ab3f37da47adf", "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2490,7 +2482,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues", "issues": "https://github.com/sebastianbergmann/exporter/issues",
"security": "https://github.com/sebastianbergmann/exporter/security/policy", "security": "https://github.com/sebastianbergmann/exporter/security/policy",
"source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1"
}, },
"funding": [ "funding": [
{ {
@ -2498,20 +2490,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-02T07:17:12+00:00" "time": "2023-09-24T13:22:09+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
"version": "6.0.2", "version": "6.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git", "url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4",
"reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2545,14 +2537,14 @@
} }
], ],
"description": "Snapshotting of global state", "description": "Snapshotting of global state",
"homepage": "https://www.github.com/sebastianbergmann/global-state", "homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [ "keywords": [
"global state" "global state"
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues", "issues": "https://github.com/sebastianbergmann/global-state/issues",
"security": "https://github.com/sebastianbergmann/global-state/security/policy", "security": "https://github.com/sebastianbergmann/global-state/security/policy",
"source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1"
}, },
"funding": [ "funding": [
{ {
@ -2560,7 +2552,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-02T07:19:19+00:00" "time": "2023-07-19T07:19:23+00:00"
}, },
{ {
"name": "sebastian/lines-of-code", "name": "sebastian/lines-of-code",
@ -3611,16 +3603,16 @@
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
"version": "1.2.3", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/theseer/tokenizer.git", "url": "https://github.com/theseer/tokenizer.git",
"reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3649,7 +3641,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": { "support": {
"issues": "https://github.com/theseer/tokenizer/issues", "issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/1.2.3" "source": "https://github.com/theseer/tokenizer/tree/1.2.2"
}, },
"funding": [ "funding": [
{ {
@ -3657,7 +3649,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-03-03T12:36:25+00:00" "time": "2023-11-20T00:12:19+00:00"
}, },
{ {
"name": "vimeo/psalm", "name": "vimeo/psalm",

@ -10,7 +10,7 @@ use PHPUnit\Framework\TestCase;
class ScheduleStepTest extends TestCase class ScheduleStepTest extends TestCase
{ {
public function testtoStringInterface(): void public function test(): void
{ {
$stub = $this->createStub(Factor::class); $stub = $this->createStub(Factor::class);
$ss = new ScheduleStep('dummy', $stub, 0); $ss = new ScheduleStep('dummy', $stub, 0);

@ -10,7 +10,7 @@ use PHPUnit\Framework\TestCase;
class VariableTest extends TestCase class VariableTest extends TestCase
{ {
public function testGetterSetter(): void public function test(): void
{ {
$gd_prior = new GaussianDistribution(); $gd_prior = new GaussianDistribution();
$var = new Variable('dummy', $gd_prior); $var = new Variable('dummy', $gd_prior);

@ -14,9 +14,9 @@ use PHPUnit\Framework\Attributes\UsesClass;
use Exception; use Exception;
#[CoversClass(Matrix::class)] #[CoversClass(Matrix::class)]
#[CoversClass(SquareMatrix::class)] #[UsesClass(SquareMatrix::class)]
#[CoversClass(IdentityMatrix::class)] #[UsesClass(IdentityMatrix::class)]
#[CoversClass(DiagonalMatrix::class)] #[UsesClass(DiagonalMatrix::class)]
// phpcs:disable PSR2.Methods.FunctionCallSignature,Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma // phpcs:disable PSR2.Methods.FunctionCallSignature,Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma
class MatrixTest extends TestCase class MatrixTest extends TestCase
{ {

@ -9,11 +9,10 @@ use PHPUnit\Framework\TestCase;
class PlayerTest extends TestCase class PlayerTest extends TestCase
{ {
public function testPlayerObjectGetterSetter(): void public function test(): void
{ {
$p = new Player('dummy', 0.1, 0.2); $p = new Player('dummy', 0.1, 0.2);
$this->assertEquals('dummy', (string)$p); $this->assertEquals('dummy', (string)$p);
$this->assertEquals('dummy', $p->getId());
$this->assertEquals(0.1, $p->getPartialPlayPercentage()); $this->assertEquals(0.1, $p->getPartialPlayPercentage());
$this->assertEquals(0.2, $p->getPartialUpdatePercentage()); $this->assertEquals(0.2, $p->getPartialUpdatePercentage());
} }

@ -17,6 +17,7 @@ class TwoPlayerTrueSkillCalculatorTest extends TestCase
{ {
$calculator = new TwoPlayerTrueSkillCalculator(); $calculator = new TwoPlayerTrueSkillCalculator();
// We only support two players
TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator); TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
} }
} }

@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\Attributes\CoversNothing;
#[CoversClass(TwoTeamTrueSkillCalculator::class)] //#[CoversClass(TwoTeamTrueSkillCalculator::class)]
class TwoTeamTrueSkillCalculatorTest extends TestCase class TwoTeamTrueSkillCalculatorTest extends TestCase
{ {
#[CoversNothing] #[CoversNothing]
@ -17,6 +17,7 @@ class TwoTeamTrueSkillCalculatorTest extends TestCase
{ {
$calculator = new TwoTeamTrueSkillCalculator(); $calculator = new TwoTeamTrueSkillCalculator();
// We only support two players
TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator); TrueSkillCalculatorTests::testAllTwoPlayerScenarios($this, $calculator);
TrueSkillCalculatorTests::testAllTwoTeamScenarios($this, $calculator); TrueSkillCalculatorTests::testAllTwoTeamScenarios($this, $calculator);
} }