-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSplIntEnum.php
More file actions
46 lines (39 loc) · 834 Bytes
/
Copy pathSplIntEnum.php
File metadata and controls
46 lines (39 loc) · 834 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* Part of SplTypes package.
*
* (c) Adrien Loyant <donald_duck@team-df.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Ducks\Component\SplTypes;
/**
* SplIntEnum gives the ability to emulate and create int enumeration objects natively in PHP.
*
* @extends SplEnumBacked<int>
*
* @psalm-api
*/
abstract class SplIntEnum extends SplEnumBacked
{
/**
* Value of enum instance.
*
* @var int
*/
protected int $value;
/**
* {@inheritdoc}
*/
final protected function __construct()
{
$this->__default = 0;
parent::__construct();
}
final public function &__invoke(): int
{
return $this->__default;
}
}