Skip to content

Commit

Permalink
Adjusted code style for less conditions branching
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Apr 26, 2017
1 parent 70dc2fa commit 3a8f702
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions framework/caching/DbCache.php
Expand Up @@ -136,9 +136,8 @@ protected function getValue($key)
$this->db->enableQueryCache = true;

return $result;
} else {
return $query->createCommand($this->db)->queryScalar();
}
return $query->createCommand($this->db)->queryScalar();
}

/**
Expand Down Expand Up @@ -200,9 +199,8 @@ protected function setValue($key, $value, $duration)
$this->gc();

return true;
} else {
return $this->addValue($key, $value, $duration);
}
return $this->addValue($key, $value, $duration);
}

/**
Expand Down

0 comments on commit 3a8f702

Please sign in to comment.