for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Nucleus - XMPP Library for PHP
*
* Copyright (C) 2017, Some rights reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* From Kadet with love.
*/
namespace Kadet\Xmpp\Utils;
class Enum
{
public static function available() {
static $reflection = null;
if(!$reflection) {
$reflection = new \ReflectionClass(static::class);
}
return $reflection->getConstants();
public static function valid($value) {
return in_array($value, self::available());