@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * Basic Implementation of LoggerAwareInterface. |
| 13 | 13 | */ |
| 14 | -trait LoggerAwareTrait |
|
| 15 | -{ |
|
| 14 | +trait LoggerAwareTrait { |
|
| 16 | 15 | /** |
| 17 | 16 | * The logger instance. |
| 18 | 17 | * |
@@ -25,8 +24,7 @@ discard block |
||
| 25 | 24 | * |
| 26 | 25 | * @param LoggerInterface $logger |
| 27 | 26 | */ |
| 28 | - public function setLogger(LoggerInterface $logger) |
|
| 29 | - { |
|
| 27 | + public function setLogger(LoggerInterface $logger) { |
|
| 30 | 28 | $this->logger = $logger; |
| 31 | 29 | } |
| 32 | 30 | } |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | /** |
| 12 | 12 | * Describes a logger-aware instance. |
| 13 | 13 | */ |
| 14 | -interface LoggerAwareInterface |
|
| 15 | -{ |
|
| 14 | +interface LoggerAwareInterface { |
|
| 16 | 15 | /** |
| 17 | 16 | * Sets a logger instance on the object. |
| 18 | 17 | * |
@@ -15,10 +15,8 @@ |
||
| 15 | 15 | * |
| 16 | 16 | * @internal |
| 17 | 17 | */ |
| 18 | -class DummyTest |
|
| 19 | -{ |
|
| 20 | - public function __toString() |
|
| 21 | - { |
|
| 18 | +class DummyTest { |
|
| 19 | + public function __toString() { |
|
| 22 | 20 | return 'DummyTest'; |
| 23 | 21 | } |
| 24 | 22 | } |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md |
| 24 | 24 | * for the full interface specification. |
| 25 | 25 | */ |
| 26 | -interface LoggerInterface |
|
| 27 | -{ |
|
| 26 | +interface LoggerInterface { |
|
| 28 | 27 | /** |
| 29 | 28 | * System is unusable. |
| 30 | 29 | * |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | * |
| 46 | 46 | * @return string |
| 47 | 47 | */ |
| 48 | - function random_bytes($bytes) |
|
| 49 | - { |
|
| 48 | + function random_bytes($bytes) { |
|
| 50 | 49 | /** @var resource $fp */ |
| 51 | 50 | static $fp = null; |
| 52 | 51 | |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | * |
| 39 | 39 | * @return int |
| 40 | 40 | */ |
| 41 | - function random_int($min, $max) |
|
| 42 | - { |
|
| 41 | + function random_int($min, $max) { |
|
| 43 | 42 | /** |
| 44 | 43 | * Type and input logic checks |
| 45 | 44 | * |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | * |
| 41 | 41 | * @return string |
| 42 | 42 | */ |
| 43 | - function random_bytes($bytes) |
|
| 44 | - { |
|
| 43 | + function random_bytes($bytes) { |
|
| 45 | 44 | try { |
| 46 | 45 | /** @var int $bytes */ |
| 47 | 46 | $bytes = RandomCompat_intval($bytes); |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | * |
| 46 | 46 | * @throws TypeError |
| 47 | 47 | */ |
| 48 | - function RandomCompat_intval($number, $fail_open = false) |
|
| 49 | - { |
|
| 48 | + function RandomCompat_intval($number, $fail_open = false) { |
|
| 50 | 49 | if (is_int($number) || is_float($number)) { |
| 51 | 50 | $number += 0; |
| 52 | 51 | } elseif (is_numeric($number)) { |
@@ -208,8 +208,7 @@ |
||
| 208 | 208 | * @throws Exception |
| 209 | 209 | * @return string |
| 210 | 210 | */ |
| 211 | - function random_bytes($length) |
|
| 212 | - { |
|
| 211 | + function random_bytes($length) { |
|
| 213 | 212 | unset($length); // Suppress "variable not used" warnings. |
| 214 | 213 | throw new Exception( |
| 215 | 214 | 'There is no suitable CSPRNG installed on your system' |