<?php

/**
 * This file is part of the ValueObjects package.
 *
 * (c) Lorenzo Marzullo <marzullo.lorenzo@gmail.com>
 */

namespace ValueObjects\Enum;

use MyCLabs\Enum\Enum;
use ValueObjects\ValueObjectInterface;

/**
 * Class AbstractEnum.
 *
 * @package ValueObjects
 * @author  Lorenzo Marzullo <marzullo.lorenzo@gmail.com>
 * @link    http://github.com/lorenzomar/valueobjects
 */
abstract class AbstractEnum extends Enum implements ValueObjectInterface
{
    public function sameValueAs(ValueObjectInterface $valueObject)
    {
        return $this == $valueObject;
    }

    public function copy()
    {
        return clone $this;
    }

    public function __clone()
    {
        return new static($this->getValue());
    }
}
<?php

/**
 * This file is part of the ValueObject package.
 *
 * (c) Lorenzo Marzullo <marzullo.lorenzo@gmail.com>
 */

namespace ValueObject\Enum;

use MyCLabs\Enum\Enum;
use ValueObject\SimpleValueObjectInterface;
use ValueObject\ValueObjectInterface;

/**
 * Class AbstractEnum.
 *
 * @package ValueObject
 * @author  Lorenzo Marzullo <marzullo.lorenzo@gmail.com>
 * @link    http://github.com/lorenzomar/valueobjects
 */
abstract class AbstractEnum extends Enum implements SimpleValueObjectInterface
{
    public function value()
    {
        return $this->getValue();
    }

    public function sameValueAs(ValueObjectInterface $valueObject)
    {
        return $this == $valueObject;
    }

    public function copy()
    {
        return clone $this;
    }

    public function __clone()
    {
        return new static($this->value());
    }
}
Update namespace and implement SimpleValueObject
Update namespace and implement SimpleValueObject
