Skip to content

Commit

Permalink
fix php cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Jun 11, 2020
1 parent e6af427 commit 99e2203
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/HasConditionalCalls.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ public function when($condition, ?Closure $callback = null)
}

return $this;

}
}
28 changes: 12 additions & 16 deletions tests/UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public function bar()
$proxied
->foo()
->when(true)
->bar()
;
->bar();

assertSame('foo', $proxied->foo);
assertSame('bar', $proxied->bar);
Expand All @@ -41,8 +40,7 @@ public function bar()
$proxied
->when(true)
->bar()
->foo()
;
->foo();

assertSame('foo', $proxied->foo);
assertSame('bar', $proxied->bar);
Expand All @@ -53,8 +51,7 @@ public function bar()
$proxied
->foo()
->when(false)
->bar()
;
->bar();

assertSame('foo', $proxied->foo);
assertNull($proxied->bar);
Expand All @@ -65,8 +62,7 @@ public function bar()
$proxied
->when(false)
->bar()
->foo()
;
->foo();

assertSame('foo', $proxied->foo);
assertNull($proxied->bar);
Expand All @@ -77,8 +73,7 @@ public function bar()
$proxied
->foo()
->when('lorem')
->bar()
;
->bar();

assertSame('foo', $proxied->foo);
assertSame('bar', $proxied->bar);
Expand All @@ -89,8 +84,7 @@ public function bar()
$proxied
->foo()
->when(null)
->bar()
;
->bar();

assertSame('foo', $proxied->foo);
assertNull($proxied->bar);
Expand All @@ -100,8 +94,9 @@ public function bar()
$proxied = new Proxied();
$proxied
->foo()
->when(true, function(Proxied $p) { return $p->bar(); })
;
->when(true, function (Proxied $p) {
return $p->bar();
});

assertSame('foo', $proxied->foo);
assertSame('bar', $proxied->bar);
Expand All @@ -111,8 +106,9 @@ public function bar()
$proxied = new Proxied();
$proxied
->foo()
->when(false, function(Proxied $p) { return $p->bar(); })
;
->when(false, function (Proxied $p) {
return $p->bar();
});

assertSame('foo', $proxied->foo);
assertNull($proxied->bar);
Expand Down

0 comments on commit 99e2203

Please sign in to comment.