for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the eav package.
* @author Alex Kuperwood <[email protected]>
* @copyright 2025 Alex Kuperwood
* @license https://opensource.org/license/mit The MIT License
*/
declare(strict_types=1);
namespace Kuperwood\Eav\Value;
* @property $data
class ValueState
{
protected $value;
public function __construct() {
$this->clear();
}
public function set($value) : void
$this->value = $value;
public function get()
if(!$this->isChanged())
return null;
return $this->value;
public function isChanged() : bool
return !$this->value instanceof ValueEmpty;
public function clear() : void
$this->value = new ValueEmpty();