first commit
This commit is contained in:
22
enums/SourceEnum.php
Normal file
22
enums/SourceEnum.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace app\enums;
|
||||
|
||||
enum SourceEnum
|
||||
{
|
||||
case VOGEU;
|
||||
|
||||
public function baseUrl(): string
|
||||
{
|
||||
return match($this) {
|
||||
self::VOGEU => 'https://www.vogue.com/',
|
||||
};
|
||||
}
|
||||
|
||||
public function value(): int
|
||||
{
|
||||
return match($this) {
|
||||
self::VOGEU => 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user