Unum doens't have method for checking if any dirty properties present
asgaines opened this issue · 2 comments
asgaines commented
Possible implementation:
public function isClean()
{
return empty($this->propertyDirty);
}
With test:
public function test_is_clean()
{
$entity = new TestEntity(['testProp' => 'test1', 'test_prop' => 'test2']);
$this->assertTrue($entity->isClean());
$entity->testProp = 'testInfinity';
$this->assertFalse($entity->isClean());
}
Danno040 commented
If you have an implementation and a test, why is this not a PR?
Sent from my iPhone, so please excuse typos.
On Jul 31, 2015, at 5:16 PM, Andrew Gaines notifications@github.com wrote:
Possible implementation:
public function isClean()
{
return empty($this->propertyDirty);
}
With test:public function test_is_clean()
{
$entity = new TestEntity(['testProp' => 'test1', 'test_prop' => 'test2']);$this->assertTrue($entity->isClean()); $entity->testProp = 'testInfinity'; $this->assertFalse($entity->isClean());
}
―
Reply to this email directly or view it on GitHub.