Browse Source

fix PHPCS

antograssiot 11 years ago
parent
commit
7d22adda1e
2 changed files with 7 additions and 3 deletions
  1. 7 2
      src/Datasource/EntityTrait.php
  2. 0 1
      tests/TestCase/ORM/EntityTest.php

+ 7 - 2
src/Datasource/EntityTrait.php

@@ -230,7 +230,10 @@ trait EntityTrait {
 
 			$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];
 			}
 
@@ -509,7 +512,9 @@ trait EntityTrait {
 	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);
 			}
 		}

+ 0 - 1
tests/TestCase/ORM/EntityTest.php

@@ -43,7 +43,6 @@ class EntityTest extends TestCase {
 		$this->assertSame(1, $entity->id);
 		$this->assertEquals(1, $entity->getOriginal('id'));
 		$this->assertEquals('bar', $entity->getOriginal('foo'));
-
 	}
 
 /**