Skip to content

Commit 38f6554

Browse files
authored
Fix inconsistent features const casing (#170)
Remove marc-mabe/php-enum dependency
1 parent 0ae92a0 commit 38f6554

5 files changed

Lines changed: 47 additions & 10 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
"ext-curl": "*",
6363
"ext-simplexml": "*",
6464
"ext-mbstring": "*",
65-
"ext-json": "*",
66-
"marc-mabe/php-enum": "^4.7"
65+
"ext-json": "*"
6766
},
6867
"suggest": {
6968
"psr/http-client-implementation": "To use the PsrHttpClientTransport.",

src/Enum/Enum.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/*
4+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5+
*
6+
* Copyright (c) 2016-2023 BigBlueButton Inc. and by respective authors (see below).
7+
*
8+
* This program is free software; you can redistribute it and/or modify it under the
9+
* terms of the GNU Lesser General Public License as published by the Free Software
10+
* Foundation; either version 3.0 of the License, or (at your option) any later
11+
* version.
12+
*
13+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License along
18+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
21+
namespace BigBlueButton\Enum;
22+
23+
/**
24+
* @psalm-immutable
25+
*/
26+
abstract class Enum
27+
{
28+
public static function getValues(): array
29+
{
30+
$reflection = new \ReflectionClass(static::class);
31+
32+
return $reflection->getConstants();
33+
}
34+
}

src/Enum/Feature.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
namespace BigBlueButton\Enum;
2222

23-
use MabeEnum\Enum;
24-
2523
/**
2624
* @psalm-immutable
2725
*/
@@ -32,8 +30,8 @@ class Feature extends Enum
3230
public const CHAT = 'chat';
3331
public const DOWNLOAD_PRESENTATION_WITH_ANNOTATIONS = 'downloadPresentationWithAnnotations';
3432
public const EXTERNAL_VIDEOS = 'externalVideos';
35-
public const IMPORT_PRESENTATION_WITHANNOTATIONS_FROM_BREAKOUTROOMS = 'importPresentationWithAnnotationsFromBreakoutRooms';
36-
public const IMPORT_SHARED_NOTES_FROM_BREAKOUTROOMS = 'importSharedNotesFromBreakoutRooms';
33+
public const IMPORT_PRESENTATION_WITH_ANNOTATIONS_FROM_BREAKOUT_ROOMS = 'importPresentationWithAnnotationsFromBreakoutRooms';
34+
public const IMPORT_SHARED_NOTES_FROM_BREAKOUT_ROOMS = 'importSharedNotesFromBreakoutRooms';
3735
public const LAYOUTS = 'layouts';
3836
public const LEARNING_DASHBOARD = 'learningDashboard';
3937
public const POLLS = 'polls';
@@ -48,4 +46,14 @@ class Feature extends Enum
4846
public const DOWNLOAD_PRESENTATION_ORIGINAL_FILE = 'downloadPresentationOriginalFile';
4947
public const DOWNLOAD_PRESENTATION_CONVERTED_TO_PDF = 'downloadPresentationConvertedToPdf';
5048
public const TIMER = 'timer';
49+
50+
/**
51+
* @deprecated Use Feature::IMPORT_PRESENTATION_WITH_ANNOTATIONS_FROM_BREAKOUT_ROOMS instead
52+
*/
53+
public const IMPORT_PRESENTATION_WITHANNOTATIONS_FROM_BREAKOUTROOMS = 'importPresentationWithAnnotationsFromBreakoutRooms';
54+
55+
/**
56+
* @deprecated Use Feature::IMPORT_SHARED_NOTES_FROM_BREAKOUT_ROOMS instead
57+
*/
58+
public const IMPORT_SHARED_NOTES_FROM_BREAKOUTROOMS = 'importSharedNotesFromBreakoutRooms';
5159
}

src/Enum/HashingAlgorithm.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
namespace BigBlueButton\Enum;
2222

23-
use MabeEnum\Enum;
24-
2523
/**
2624
* @psalm-immutable
2725
*/

src/Enum/Role.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
namespace BigBlueButton\Enum;
2222

23-
use MabeEnum\Enum;
24-
2523
/**
2624
* @psalm-immutable
2725
*/

0 commit comments

Comments
 (0)