-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This assertion can be used to easily assert stuff like: > Assert::implies($hasDog, $leashAttached); Which will assert that $leashAttached is true, if $hasDog is true. This is a shorthand for `Assert::true(!$hasDog || $leashAttached)`.
- Loading branch information
1 parent
9c89b26
commit 9051325
Showing
5 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace Webmozart\Assert\Tests\StaticAnalysis; | ||
|
||
use Webmozart\Assert\Assert; | ||
|
||
/** | ||
* @param mixed $p | ||
* @param mixed $q | ||
* | ||
* @return mixed | ||
*/ | ||
function implies($p, $q) | ||
{ | ||
Assert::implies($p, $q); | ||
|
||
return $p; | ||
} | ||
|
||
/** | ||
* @param mixed $p | ||
* @param mixed $q | ||
* | ||
* @return mixed | ||
*/ | ||
function nullOrImplies($p, $q) | ||
{ | ||
Assert::nullOrImplies($p, $q); | ||
|
||
return $p; | ||
} | ||
|
||
/** | ||
* @param mixed $p | ||
* @param mixed $q | ||
* | ||
* @return mixed | ||
*/ | ||
function allImplies($p, $q) | ||
{ | ||
Assert::allImplies($p, $q); | ||
|
||
return $p; | ||
} |