Permalink
Browse files

minor #112 use of keys prop for isset() check of services/values (rap…

…hahardt)

This PR was merged into the 2.0.x-dev branch.

Discussion
----------

use of keys prop for isset() check of services/values

Why not just use the keys prop for check if a service/value exists in Pimple?

Commits
-------

e2b05ce use of keys prop for isset() check of services/values
  • Loading branch information...
2 parents 30651c5 + e2b05ce commit a9e94d9fd6cb9e8f097551a25ffec73ff2480a24 @fabpot committed Mar 6, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Pimple.php
View
@@ -122,7 +122,7 @@ public function offsetGet($id)
*/
public function offsetExists($id)
{
- return array_key_exists($id, $this->values);
+ return isset($this->keys[$id]);
}
/**

0 comments on commit a9e94d9

Please sign in to comment.