Permalink
Browse files

Minor simplification.

  • Loading branch information...
1 parent 074fced commit f655e8a7bcc0a363c62466b5389b09b0846a5635 @markstory markstory committed Aug 25, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/Cake/Utility/Hash.php
View
@@ -250,12 +250,11 @@ public static function insert(array $data, $path, $values = null) {
foreach ($data as $k => $v) {
if (self::_matchToken($k, $token)) {
- if ($conditions) {
- if (self::_matches($v, $conditions)) {
- $data[$k] = array_merge($v, $values);
- continue;
- }
- } else {
+ if ($conditions && self::_matches($v, $conditions)) {
+ $data[$k] = array_merge($v, $values);
+ continue;
+ }
+ if (!$conditions) {
$data[$k] = self::insert($v, $nextPath, $values);
}
}

0 comments on commit f655e8a

Please sign in to comment.