mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-10-31 16:32:29 +01:00 
			
		
		
		
	Pint applied for formatting
This commit is contained in:
		| @@ -1,4 +1,6 @@ | ||||
| <?php namespace DNW\Skills\Numerics; | ||||
| <?php | ||||
|  | ||||
| namespace DNW\Skills\Numerics; | ||||
|  | ||||
| // The whole purpose of this class is to make the code for the SkillCalculator(s) | ||||
| // look a little cleaner | ||||
| @@ -8,13 +10,13 @@ use Exception; | ||||
| class Range | ||||
| { | ||||
|     private $_min; | ||||
|  | ||||
|     private $_max; | ||||
|  | ||||
|     public function __construct($min, $max) | ||||
|     { | ||||
|         if ($min > $max) | ||||
|         { | ||||
|             throw new Exception("min > max"); | ||||
|         if ($min > $max) { | ||||
|             throw new Exception('min > max'); | ||||
|         } | ||||
|  | ||||
|         $this->_min = $min; | ||||
| @@ -50,11 +52,11 @@ class Range | ||||
|  | ||||
|     public static function atLeast($minimumValue) | ||||
|     { | ||||
|         return static::create($minimumValue, PHP_INT_MAX ); | ||||
|         return static::create($minimumValue, PHP_INT_MAX); | ||||
|     } | ||||
|  | ||||
|     public function isInRange($value) | ||||
|     { | ||||
|         return ($this->_min <= $value) && ($value <= $this->_max); | ||||
|     } | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex Wulf
					Alex Wulf