1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-13 08:44:02 +00:00

Added "Invokable Cases" PHPStan extension testing

This commit is contained in:
Samuel Levy 2022-08-22 12:26:25 +10:00
parent 7e6914a52f
commit 72103f9eaf
6 changed files with 226 additions and 0 deletions

View file

@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace ArchTech\Enums\Tests\PHPStan\InvokableCases;
use ArchTech\Enums\InvokableCases;
enum Role
{
use InvokableCases;
case admin;
case manager;
case staff;
public static function administrator(): self
{
return self::admin;
}
public function isManager(): bool
{
return $this === self::manager;
}
}