@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function randomInt() |
| 23 | 23 | { |
| 24 | - $hash = md5($this->hashedSeed . $this->state++, true); |
|
| 24 | + $hash = md5($this->hashedSeed.$this->state++, true); |
|
| 25 | 25 | $num = unpack('V*', $hash); |
| 26 | 26 | |
| 27 | 27 | // Create two 64bit numbers from four 32bit int and xor them |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } elseif ($max > static::INT_MAX) { |
| 202 | 202 | throw new RandException('Max is bigger than maximum generator value'); |
| 203 | 203 | } |
| 204 | - return $min + (int)(($max - $min + 1) * $this->randomInt() * $this->intMaxDiv); |
|
| 204 | + return $min + (int) (($max - $min + 1) * $this->randomInt() * $this->intMaxDiv); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | { |
| 237 | 237 | static $asciiTable; |
| 238 | 238 | if ($asciiTable === null) { |
| 239 | - $asciiTable = array_map(function ($v){ return chr($v); }, range(0, 255)); |
|
| 239 | + $asciiTable = array_map(function($v) { return chr($v); }, range(0, 255)); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | if ($length < 1) { |
@@ -49,9 +49,9 @@ |
||
| 49 | 49 | $this->x[self::BLOCK_COUNT] = 0.0; |
| 50 | 50 | $this->ay0 = self::A / $this->y[0]; |
| 51 | 51 | |
| 52 | - $this->xComp[0] = (int)(((self::R * $this->y[0]) / self::A) * $rng::INT_MAX); |
|
| 52 | + $this->xComp[0] = (int) (((self::R * $this->y[0]) / self::A) * $rng::INT_MAX); |
|
| 53 | 53 | for ($i = 1; $i < self::BLOCK_COUNT - 1; $i++) { |
| 54 | - $this->xComp[$i] = (int)(($this->x[$i + 1] / $this->x[$i]) * $rng::INT_MAX); |
|
| 54 | + $this->xComp[$i] = (int) (($this->x[$i + 1] / $this->x[$i]) * $rng::INT_MAX); |
|
| 55 | 55 | } |
| 56 | 56 | $this->xComp[self::BLOCK_COUNT - 1] = 0; |
| 57 | 57 | } |