mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 02:02:29 +01:00 
			
		
		
		
	PHPMD reintroduced.
This commit is contained in:
		@@ -7,6 +7,7 @@ namespace DNW\Skills\Tests;
 | 
			
		||||
use DNW\Skills\HashMap;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
use PHPUnit\Framework\Attributes\CoversClass;
 | 
			
		||||
use stdClass;
 | 
			
		||||
 | 
			
		||||
#[CoversClass(HashMap::class)]
 | 
			
		||||
class HashMapTest extends TestCase
 | 
			
		||||
@@ -19,8 +20,8 @@ class HashMapTest extends TestCase
 | 
			
		||||
        $this->assertEquals([], $h->getAllValues());
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        $o1 = new \stdClass();
 | 
			
		||||
        $o2 = new \stdClass();
 | 
			
		||||
        $o1 = new stdClass();
 | 
			
		||||
        $o2 = new stdClass();
 | 
			
		||||
 | 
			
		||||
        $h->setValue($o1, 1);
 | 
			
		||||
        $h->setvalue($o2, 2);
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,6 @@ use DNW\Skills\Player;
 | 
			
		||||
use DNW\Skills\Rating;
 | 
			
		||||
use DNW\Skills\SkillCalculator;
 | 
			
		||||
use DNW\Skills\Team;
 | 
			
		||||
use DNW\Skills\Teams;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
class TrueSkillCalculatorTests
 | 
			
		||||
@@ -70,7 +69,6 @@ class TrueSkillCalculatorTests
 | 
			
		||||
    // online calculator at http://atom.research.microsoft.com/trueskill/rankcalculator.aspx
 | 
			
		||||
    //
 | 
			
		||||
    // All match quality expected values came from the online calculator
 | 
			
		||||
 | 
			
		||||
    // In both cases, there may be some discrepancy after the first decimal point. I think this is due to my implementation
 | 
			
		||||
    // using slightly higher precision in GaussianDistribution.
 | 
			
		||||
 | 
			
		||||
@@ -849,24 +847,7 @@ class TrueSkillCalculatorTests
 | 
			
		||||
        $team15 = new Team($player15, $gameInfo->getDefaultRating());
 | 
			
		||||
        $team16 = new Team($player16, $gameInfo->getDefaultRating());
 | 
			
		||||
 | 
			
		||||
        $teams = [
 | 
			
		||||
            $team1,
 | 
			
		||||
            $team2,
 | 
			
		||||
            $team3,
 | 
			
		||||
            $team4,
 | 
			
		||||
            $team5,
 | 
			
		||||
            $team6,
 | 
			
		||||
            $team7,
 | 
			
		||||
            $team8,
 | 
			
		||||
            $team9,
 | 
			
		||||
            $team10,
 | 
			
		||||
            $team11,
 | 
			
		||||
            $team12,
 | 
			
		||||
            $team13,
 | 
			
		||||
            $team14,
 | 
			
		||||
            $team15,
 | 
			
		||||
            $team16
 | 
			
		||||
        ];
 | 
			
		||||
        $teams = [$team1, $team2, $team3, $team4, $team5, $team6, $team7, $team8, $team9, $team10, $team11, $team12, $team13, $team14, $team15, $team16];
 | 
			
		||||
 | 
			
		||||
        $newRatings = $calculator->calculateNewRatings(
 | 
			
		||||
            $gameInfo,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user