Skip to content

Commit

Permalink
Merge pull request traderinteractive#17 from chrisryan/master
Browse files Browse the repository at this point in the history
Update library to work on Php 7
  • Loading branch information
raybot committed May 21, 2015
2 parents 4a1b921 + bc83048 commit 178214f
Show file tree
Hide file tree
Showing 6 changed files with 428 additions and 264 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
/coverage/
/vendor/
clover.xml
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -115,15 +115,15 @@ $compute = function() {
$result = $memoize->memoizeCallable('myLongOperation', $compute);
```

### Null
### Never
This memoizer does not actually memoize anything - it always calls the
`$compute` function. It is useful for testing and can also be used when you
disable memoization for debugging, etc. because you can swap your real memoizer
out for this one and everything will still work.

#### Example
```php
$memoize = new \DominionEnterprises\Memoize\Null();
$memoize = new \DominionEnterprises\Memoize\Never();

$compute = function() {
// Perform some long operation that you want to memoize
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -11,7 +11,7 @@
],
"license": "MIT",
"require": {
"php": "~5.4"
"php": "~5.4 || ~7.0"
},
"require-dev": {
"predis/predis": "~1.0",
Expand Down

0 comments on commit 178214f

Please sign in to comment.