File: DummyEnum.php

package info (click to toggle)
php-enum 4.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 556 kB
  • sloc: php: 3,481; xml: 15; makefile: 8
file content (29 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

declare(strict_types=1);

namespace MabeEnumStaticAnalysis;

use MabeEnum\Enum;
use phpDocumentor\Reflection\Types\Static_;

/**
 * @psalm-immutable enums are immutable
 */
final class DummyEnum extends Enum
{
    public const A = 'A_VALUE';
    public const B = 'B_VALUE';

    /** @psalm-pure */
    public static function a(): self
    {
        return self::get(self::A);
    }

    /** @psalm-pure */
    public static function b(): self
    {
        return self::get(self::B);
    }
}