Skip to content

Commit

Permalink
Fix PHPCS warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 11, 2014
1 parent 42cdf10 commit bd497e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Datasource/EntityTrait.php
Expand Up @@ -610,8 +610,10 @@ protected function _nestedErrors($field) {
}

$entity = $this;
while (count($path)) {
$len = count($path);
while ($len) {
$part = array_shift($path);
$len = count($path);
if ($entity instanceof static) {
$val = $entity->get($part);
} elseif (is_array($entity)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/EntityTest.php
Expand Up @@ -831,7 +831,7 @@ public function testErrorsDeep() {
*/
public function testErrorPathReading() {
$assoc = new Entity;
$entity= new Entity([
$entity = new Entity([
'field' => 'value',
'one' => $assoc,
'many' => [$assoc]
Expand Down

0 comments on commit bd497e4

Please sign in to comment.