Skip to content

Commit

Permalink
Merge branch 'release/v0.2.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
betterthanclay committed Mar 18, 2021
2 parents ac4ad64 + 428d122 commit b0fa5d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ os:
dist: 'bionic'

php:
- '8.0'
- '7.4'
- '7.3'
- '7.2'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.2.0 (2021-03-18)
* Enable PHP8 testing

## v0.1.2 (2020-10-07)
* Made Then $truth nullable

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"email": "tom@inflatablecookie.com"
}],
"require": {
"php": "^7.2"
"php": "^7.2|^8.0"
},
"require-dev": {
"phpunit/phpunit": "^8",
"phpstan/phpstan": "^0.12.45",
"phpstan/extension-installer": "^1.0",
"decodelabs/phpstan-decodelabs": "^0.3.10",
"decodelabs/phpstan-decodelabs": "^0.4",
"symplify/easy-coding-standard": "^8.3"
},
"autoload": {
Expand All @@ -30,7 +30,7 @@
},
"extra": {
"branch-alias": {
"dev-develop": "0.1.x-dev"
"dev-develop": "0.2.x-dev"
}
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/ThenTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function thenEach(iterable $values, callable $callback): Then
*/
public function thenIf(?bool $truth, callable $yes, callable $no = null): Then
{
if ($truth) {
if ($truth === true) {
$yes($this, $truth);
} elseif (is_callable($no)) {
$no($this, $truth);
Expand All @@ -63,7 +63,7 @@ public function thenIf(?bool $truth, callable $yes, callable $no = null): Then
*/
public function thenUnless(?bool $truth, callable $no, callable $yes = null): Then
{
if (!$truth) {
if ($truth !== true) {
$no($this, $truth);
} elseif (is_callable($yes)) {
$yes($this, $truth);
Expand Down

0 comments on commit b0fa5d7

Please sign in to comment.