mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-03 17:52:29 +01:00 
			
		
		
		
	Less modern PHP to make the older linting tools work on the examples code
This commit is contained in:
		@@ -2,11 +2,11 @@
 | 
				
			|||||||
<phive xmlns="https://phar.io/phive">
 | 
					<phive xmlns="https://phar.io/phive">
 | 
				
			||||||
  <phar name="phpmd" version="^2.15.0" installed="2.15.0" location="./tools/phpmd" copy="false"/>
 | 
					  <phar name="phpmd" version="^2.15.0" installed="2.15.0" location="./tools/phpmd" copy="false"/>
 | 
				
			||||||
  <phar name="phpstan" version="^2.1.12" installed="2.1.17" location="./tools/phpstan" copy="false"/>
 | 
					  <phar name="phpstan" version="^2.1.12" installed="2.1.17" location="./tools/phpstan" copy="false"/>
 | 
				
			||||||
  <phar name="psalm" version="^7.0.0-beta6" installed="7.0.0-beta10" location="./tools/psalm" copy="false"/>
 | 
					  <phar name="psalm" version="^7.0.0-beta6" installed="7.0.0-beta11" location="./tools/psalm" copy="false"/>
 | 
				
			||||||
  <phar name="phpcs" version="^3.12.2" installed="3.13.2" location="./tools/phpcs" copy="false"/>
 | 
					  <phar name="phpcs" version="^3.12.2" installed="3.13.2" location="./tools/phpcs" copy="false"/>
 | 
				
			||||||
  <phar name="phpcbf" version="^3.12.2" installed="3.13.2" location="./tools/phpcbf" copy="false"/>
 | 
					  <phar name="phpcbf" version="^3.12.2" installed="3.13.2" location="./tools/phpcbf" copy="false"/>
 | 
				
			||||||
  <phar name="phpdocumentor" version="^3.7.1" installed="3.8.0" location="./tools/phpdocumentor" copy="false"/>
 | 
					  <phar name="phpdocumentor" version="^3.7.1" installed="3.8.0" location="./tools/phpdocumentor" copy="false"/>
 | 
				
			||||||
  <phar name="phpbench" version="^1.4.1" installed="1.4.1" location="./tools/phpbench" copy="false"/>
 | 
					  <phar name="phpbench" version="^1.4.1" installed="1.4.1" location="./tools/phpbench" copy="false"/>
 | 
				
			||||||
  <phar name="infection" version="^0.29.14" installed="0.29.14" location="./tools/infection" copy="false"/>
 | 
					  <phar name="infection" version="^0.29.14" installed="0.29.14" location="./tools/infection" copy="false"/>
 | 
				
			||||||
  <phar name="phpunit" version="^12.1.3" installed="12.2.6" location="./tools/phpunit" copy="false"/>
 | 
					  <phar name="phpunit" version="^12.1.3" installed="12.2.7" location="./tools/phpunit" copy="false"/>
 | 
				
			||||||
</phive>
 | 
					</phive>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							@@ -849,16 +849,16 @@
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            "name": "phpunit/phpunit",
 | 
					            "name": "phpunit/phpunit",
 | 
				
			||||||
            "version": "11.5.26",
 | 
					            "version": "11.5.27",
 | 
				
			||||||
            "source": {
 | 
					            "source": {
 | 
				
			||||||
                "type": "git",
 | 
					                "type": "git",
 | 
				
			||||||
                "url": "https://github.com/sebastianbergmann/phpunit.git",
 | 
					                "url": "https://github.com/sebastianbergmann/phpunit.git",
 | 
				
			||||||
                "reference": "4ad8fe263a0b55b54a8028c38a18e3c5bef312e0"
 | 
					                "reference": "446d43867314781df7e9adf79c3ec7464956fd8f"
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "dist": {
 | 
					            "dist": {
 | 
				
			||||||
                "type": "zip",
 | 
					                "type": "zip",
 | 
				
			||||||
                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4ad8fe263a0b55b54a8028c38a18e3c5bef312e0",
 | 
					                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/446d43867314781df7e9adf79c3ec7464956fd8f",
 | 
				
			||||||
                "reference": "4ad8fe263a0b55b54a8028c38a18e3c5bef312e0",
 | 
					                "reference": "446d43867314781df7e9adf79c3ec7464956fd8f",
 | 
				
			||||||
                "shasum": ""
 | 
					                "shasum": ""
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "require": {
 | 
					            "require": {
 | 
				
			||||||
@@ -868,7 +868,7 @@
 | 
				
			|||||||
                "ext-mbstring": "*",
 | 
					                "ext-mbstring": "*",
 | 
				
			||||||
                "ext-xml": "*",
 | 
					                "ext-xml": "*",
 | 
				
			||||||
                "ext-xmlwriter": "*",
 | 
					                "ext-xmlwriter": "*",
 | 
				
			||||||
                "myclabs/deep-copy": "^1.13.1",
 | 
					                "myclabs/deep-copy": "^1.13.3",
 | 
				
			||||||
                "phar-io/manifest": "^2.0.4",
 | 
					                "phar-io/manifest": "^2.0.4",
 | 
				
			||||||
                "phar-io/version": "^3.2.1",
 | 
					                "phar-io/version": "^3.2.1",
 | 
				
			||||||
                "php": ">=8.2",
 | 
					                "php": ">=8.2",
 | 
				
			||||||
@@ -930,7 +930,7 @@
 | 
				
			|||||||
            "support": {
 | 
					            "support": {
 | 
				
			||||||
                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
 | 
					                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
 | 
				
			||||||
                "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
 | 
					                "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
 | 
				
			||||||
                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.26"
 | 
					                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.27"
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            "funding": [
 | 
					            "funding": [
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
@@ -954,7 +954,7 @@
 | 
				
			|||||||
                    "type": "tidelift"
 | 
					                    "type": "tidelift"
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            "time": "2025-07-04T05:58:21+00:00"
 | 
					            "time": "2025-07-11T04:10:06+00:00"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            "name": "rector/rector",
 | 
					            "name": "rector/rector",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,13 +11,14 @@ use DNW\Skills\Team;
 | 
				
			|||||||
use DNW\Skills\Teams;
 | 
					use DNW\Skills\Teams;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//load the CSV document from a stream
 | 
					//load the CSV document from a stream
 | 
				
			||||||
$stream = fopen('motogp.csv', 'r');
 | 
					$csv = Reader::createFromPath('motogp.csv', 'r');
 | 
				
			||||||
$csv = Reader::createFromStream($stream);
 | 
					 | 
				
			||||||
$csv->setDelimiter(',');
 | 
					$csv->setDelimiter(',');
 | 
				
			||||||
$csv->setHeaderOffset(0);
 | 
					$csv->setHeaderOffset(0);
 | 
				
			||||||
 | 
					$csv->setEscape('');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//build a statement
 | 
					//build a statement
 | 
				
			||||||
$stmt = new Statement()->where(static fn (array $record): bool => $record['category'] == "MotoGP" ||  $record['category'] == "500cc");
 | 
					$statement = new Statement();
 | 
				
			||||||
 | 
					$stmt = $statement->where(static fn (array $record): bool => $record['category'] == "MotoGP" ||  $record['category'] == "500cc");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @var $riders Player[]
 | 
					 * @var $riders Player[]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user