mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 02:02:29 +01:00 
			
		
		
		
	rector: instanceOf, earlyReturn, strictBooleans
This commit is contained in:
		@@ -301,9 +301,8 @@ class Matrix
 | 
			
		||||
 | 
			
		||||
        if ($isEven) {
 | 
			
		||||
            return $this->getMinorMatrix($rowToRemove, $columnToRemove)->getDeterminant();
 | 
			
		||||
        } else {
 | 
			
		||||
            return -1.0 * $this->getMinorMatrix($rowToRemove, $columnToRemove)->getDeterminant();
 | 
			
		||||
        }
 | 
			
		||||
        return -1.0 * $this->getMinorMatrix($rowToRemove, $columnToRemove)->getDeterminant();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function equals(Matrix $otherMatrix): bool
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ class PartialPlay
 | 
			
		||||
        // HACK to get around bug near 0
 | 
			
		||||
        $smallestPercentage = 0.0001;
 | 
			
		||||
        if ($partialPlayPercentage < $smallestPercentage) {
 | 
			
		||||
            $partialPlayPercentage = $smallestPercentage;
 | 
			
		||||
            return $smallestPercentage;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $partialPlayPercentage;
 | 
			
		||||
 
 | 
			
		||||
@@ -9,10 +9,13 @@ class Team extends RatingContainer
 | 
			
		||||
    public function __construct(Player $player = NULL, Rating $rating = NULL)
 | 
			
		||||
    {
 | 
			
		||||
        parent::__construct();
 | 
			
		||||
 | 
			
		||||
        if ($player && $rating) {
 | 
			
		||||
            $this->addPlayer($player, $rating);
 | 
			
		||||
        if (!$player instanceof \DNW\Skills\Player) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (!$rating instanceof \DNW\Skills\Rating) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        $this->addPlayer($player, $rating);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function addPlayer(Player $player, Rating $rating): self
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user