Skip to content

Commit

Permalink
Remove micro-optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdifabio committed Jul 14, 2015
1 parent f2e4a51 commit fbb9c67
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/JsonObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public function get($keys = array(), $default = null)
return $this->data;
}

// This is a micro-optimization, it is fast for non-nested keys, but fails for null values
if (count($keys) === 1 && isset($this->data[$keys[0]])) {
return $this->data[$keys[0]];
}

return $this->deepGet($this->data, $keys, $default);
}

Expand Down

0 comments on commit fbb9c67

Please sign in to comment.