This repository was archived by the owner on Dec 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ private function get($memberName)
160
160
* @return self
161
161
* @throws EnumNotFoundException
162
162
*/
163
- public static function findByValue ($ value )
163
+ public static function getEnumByValue ($ value )
164
164
{
165
165
foreach (self ::getMembers () as $ n => $ v ) {
166
166
if ($ value === $ v ) {
Original file line number Diff line number Diff line change @@ -31,20 +31,20 @@ public function dataCallStaticsWorks()
31
31
}
32
32
33
33
/**
34
- * @dataProvider dataFindByValueWorks
34
+ * @dataProvider dataGetEnumByValueWorks
35
35
* @param mixed $value
36
36
* @param mixed $expectedEnum
37
37
*/
38
- public function testFindByValueWorks ($ value , $ expectedEnum )
38
+ public function testGetEnumByValueWorks ($ value , $ expectedEnum )
39
39
{
40
40
if ($ expectedEnum instanceof \Exception) {
41
41
$ this ->setExpectedException (get_class ($ expectedEnum ));
42
42
}
43
43
44
- $ this ->assertSame ($ expectedEnum , MyBoolean::findByValue ($ value ));
44
+ $ this ->assertSame ($ expectedEnum , MyBoolean::getEnumByValue ($ value ));
45
45
}
46
46
47
- public function dataFindByValueWorks ()
47
+ public function dataGetEnumByValueWorks ()
48
48
{
49
49
return [
50
50
[1 , MyBoolean::MY_TRUE ()],
You can’t perform that action at this time.
0 commit comments