Skip to content

Commit

Permalink
Merge pull request #69 from staabm/patch-1
Browse files Browse the repository at this point in the history
Return false instead of null as defined in ReadInterface
  • Loading branch information
frankdejonge committed Feb 9, 2014
2 parents b98439f + 06218ec commit 1db6805
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

This comment has been minimized.

Copy link
@GrahamCampbell

GrahamCampbell Feb 9, 2014

Member

"null on failure" should be "false on failure"

This comment has been minimized.

Copy link
@staabm

staabm Feb 9, 2014

Thanks added a separate PR for those phpdoc issues

*/
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

This comment has been minimized.

Copy link
@GrahamCampbell

GrahamCampbell Feb 9, 2014

Member

"null on failure" should be "false 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 1db6805

Please sign in to comment.