minor change views; add opcache
This commit is contained in:
@@ -65,4 +65,15 @@ enum ReportStatus: int {
|
||||
{
|
||||
return ReportStatus::tryFrom($this->value+1);
|
||||
}
|
||||
public function tryFromName(string $name): ?ReportStatus
|
||||
{
|
||||
$name = strtoupper($name);
|
||||
foreach (self::cases() as $v) {
|
||||
if ($name === $v->name) {
|
||||
return $v;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -35,4 +35,16 @@ enum ReportTodoEnum: int {
|
||||
};
|
||||
}
|
||||
|
||||
public function tryFromName(string $name): ?ReportTodoEnum
|
||||
{
|
||||
$name = strtoupper($name);
|
||||
foreach (self::cases() as $v) {
|
||||
if ($name === $v->name) {
|
||||
return $v;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user