PHP Classes

File: src/Enums/EasterEgg.php

Recommend this page to a friend!
  Packages of tomloprod   Radiance   src/Enums/EasterEgg.php   Download  
File: src/Enums/EasterEgg.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Radiance
Generate avatar images from parameters
Author: By
Last change:
Date: 2 months ago
Size: 390 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
Tomloprod\Radiance\Enums;

use
Tomloprod\Colority\Colors\HexColor;

enum EasterEgg: string
{
    case
PHP = 'PHP';
    case
LARAVEL = 'LARAVEL';

    public function
getColor(): HexColor
   
{
        return
match ($this) {
           
self::PHP => new HexColor('#4f5b93'),
           
self::LARAVEL => new HexColor('#F05340'),
        };
    }
}