1. Go to this page and download the library: Download typiqally/enum library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
typiqally / enum example snippets
use Typiqally\Enum\Enum;
/**
* @method static self NORTH()
* @method static self EAST()
* @method static self SOUTH()
* @method static self WEST()
*/
class Direction extends Enum
{
}
public function walk(Direction $direction): void {
//Walk logic
}
$this->walk(Direction::NORTH());