| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Streamer |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var Song|string |
||
| 11 | */ |
||
| 12 | protected $song; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $contentType; |
||
| 18 | |||
| 19 | 11 | public function __construct() |
|
| 20 | { |
||
| 21 | // Turn off error reporting to make sure our stream isn't interfered. |
||
| 22 | 11 | @error_reporting(0); |
|
|
|
|||
| 23 | 11 | } |
|
| 24 | |||
| 25 | 6 | public function setSong(Song $song): void |
|
| 35 | } |
||
| 36 | 6 | } |
|
| 38 |
If you suppress an error, we recommend checking for the error condition explicitly: