Skip to content

Commit

Permalink
scrutinizer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mootensai committed Jul 12, 2017
1 parent 126038e commit 3349345
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RelationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public function loadAll($POST, $skippedRelations = [])
$condition = [];
$condition[$relPKAttr[0]] = $this->primaryKey;
foreach ($relPost as $relAttr => $relAttrVal) {
if (in_array($relAttr, $relPKAttr))
if (in_array($relAttr, $relPKAttr)){
$condition[$relAttr] = $relAttrVal;
}
}
$relObj = $relModelClass::findOne($condition);
if (is_null($relObj)) {
Expand Down Expand Up @@ -103,8 +104,9 @@ public function saveAll($skippedRelations = [])
/* @var $records ActiveRecord */
foreach ($this->relatedRecords as $name => $records) {

if (in_array($name, $skippedRelations))
if (in_array($name, $skippedRelations)){
continue;
}

if (!empty($records)) {
$AQ = $this->getRelation($name);
Expand Down

0 comments on commit 3349345

Please sign in to comment.