Total Complexity | 2 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class InfoController extends Controller |
||
24 | { |
||
25 | // Protected Properties |
||
26 | // ========================================================================= |
||
27 | |||
28 | protected $allowAnonymous = [ |
||
29 | 'is-live', |
||
30 | 'live-viewers', |
||
31 | ]; |
||
32 | |||
33 | // Public Methods |
||
34 | // ========================================================================= |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Returns whether the stream is currently live |
||
39 | * |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function actionIsLive(): bool |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Returns the number of people currently viewing the live stream |
||
49 | * |
||
50 | * @return int |
||
51 | */ |
||
52 | public function actionLiveViewers(): int |
||
57 |