Skip to content

Commit

Permalink
Return false instead of null as defined in ReadInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Feb 9, 2014
1 parent c65c52e commit 06218ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Cache/AbstractCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,26 +169,30 @@ public function has($path)
* Retrieve the contents of an object
*
* @param string $path
* @return null|string contents or null on failure
* @return false|string contents or null on failure
*/
public function read($path)
{
if (isset($this->cache[$path]['contents'])) {
return $this->cache[$path]['contents'];
}

return false;
}

/**
* Retrieve the contents of an object
*
* @param string $path
* @return null|string contents or null on failure
* @return false|string contents or null on failure
*/
public function readStream($path)
{
if (isset($this->cache[$path]['stream'])) {
return $this->cache[$path]['stream'];
}

return false;
}

/**
Expand Down

0 comments on commit 06218ec

Please sign in to comment.