Last active
August 10, 2022 06:45
-
-
Save mikemix/26f59cbd77cca17b9c6118e55bc87a94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User { | |
public const STATUS_NEW = 'new'; | |
public const STATUS_ACTIVE = 'active'; | |
public const STATUS_BLOCKED = 'blocked'; | |
private string $status = self::STATUS_NEW; | |
private int $age; | |
public function getStatus(): string | |
{ | |
return $this->status; | |
} | |
public function getAge(): int | |
{ | |
return $this->age; | |
} | |
public function getClassName(): string | |
{ | |
return get_class($this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment