File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ public static function toCode(int|string $code): string|int
1919 $ class = get_called_class ();
2020 if ($ class === self ::class) {
2121 throw new LogicException (get_called_class ().' 클래스를 직접 호출할 수 없습니다. ' );
22- } else {
23- if (defined ($ class .':: ' .$ code )) {
24- return constant ($ class .':: ' .$ code )['code ' ];
25- }
22+ }
23+
24+ if (defined ($ class .':: ' .$ code )) {
25+ return constant ($ class .':: ' .$ code )['code ' ];
26+ }
2627
27- $ constants = (new \ReflectionClass ($ class ))->getConstants ();
28- foreach ($ constants as $ constant ) {
29- if ($ constant ['code ' ] === $ code ) {
30- return $ constant ['code ' ];
31- } elseif ($ constant ['kr ' ] === $ code ) {
32- return $ constant ['code ' ];
33- }
28+ $ constants = (new \ReflectionClass ($ class ))->getConstants ();
29+ foreach ($ constants as $ constant ) {
30+ if ($ constant ['code ' ] === $ code ) {
31+ return $ constant ['code ' ];
32+ } elseif ($ constant ['kr ' ] === $ code ) {
33+ return $ constant ['code ' ];
3434 }
3535 }
3636
You can’t perform that action at this time.
0 commit comments