for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Eric Braun <[email protected]>
*/
abstract class Enum
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/** @var array */
protected static $cache;
* @param string|int $value
*
* @return bool
public static function isValid($value)
return in_array($value, static::getValues(), true);
}
* @return array
public static function getValues()
if (!isset(static::$cache[static::class])) {
$reflection = new ReflectionClass(static::class);
static::$cache[static::class] = $reflection->getConstants();
return static::$cache[static::class];
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.