Skip to content

Commit

Permalink
fix PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Oct 5, 2014
1 parent 21c52d2 commit 7d22add
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/Datasource/EntityTrait.php
Expand Up @@ -230,7 +230,10 @@ public function set($property, $value = null, $options = []) {

$this->dirty($p, true);

if (!isset($this->_original[$p]) && isset($this->_properties[$p]) && $this->_properties[$p] !== $value) {
if (!isset($this->_original[$p]) &&
isset($this->_properties[$p]) &&
$this->_properties[$p] !== $value
) {
$this->_original[$p] = $this->_properties[$p];
}

Expand Down Expand Up @@ -509,7 +512,9 @@ public function extract(array $properties, $onlyDirty = false) {
public function extractOriginal(array $properties) {
$result = [];
foreach ($properties as $property) {
if (($this->getOriginal($property) !== null) && ($this->getOriginal($property) !== $this->get($property))) {
if ($this->getOriginal($property) !== null &&
$this->getOriginal($property) !== $this->get($property)
) {
$result[$property] = $this->getOriginal($property);
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/ORM/EntityTest.php
Expand Up @@ -43,7 +43,6 @@ public function testSetOneParamNoSetters() {
$this->assertSame(1, $entity->id);
$this->assertEquals(1, $entity->getOriginal('id'));
$this->assertEquals('bar', $entity->getOriginal('foo'));

}

/**
Expand Down

0 comments on commit 7d22add

Please sign in to comment.