for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace lucidtaz\minimax\engine;
/**
* Enum class
*/
class NodeType
{
private $value;
private function __construct()
// Forbid direct construction
}
public static function MIN(): NodeType
$result = new static();
$result->value = 'min';
return $result;
public static function MAX(): NodeType
$result->value = 'max';
public function alternate(): NodeType
if ($this == self::MIN()) {
return self::MAX();
return self::MIN();