/var/www/vhosts/nabawater/vendor/phpunit/phpunit/src/Framework/Constraint
NameSizeModeActions
JsonMatches/-0775rm
And.php30080664editdlrm
ArrayHasKey.php19270664editdlrm
ArraySubset.php27880664editdlrm
Attribute.php24040664editdlrm
Callback.php13310664editdlrm
ClassHasAttribute.php19380664editdlrm
ClassHasStaticAttribute.php13040664editdlrm
Composite.php19340664editdlrm
Count.php30070664editdlrm
DirectoryExists.php14250664editdlrm
Exception.php21480664editdlrm
ExceptionCode.php15730664editdlrm
ExceptionMessage.php19520664editdlrm
ExceptionMessageRegExp.php18340664editdlrm
FileExists.php14100664editdlrm
GreaterThan.php11740664editdlrm
IsAnything.php15400664editdlrm
IsEmpty.php15250664editdlrm
IsEqual.php48480664editdlrm
IsFalse.php8360664editdlrm
IsFinite.php8400664editdlrm
IsIdentical.php37460664editdlrm
IsInfinite.php8480664editdlrm
IsInstanceOf.php21890664editdlrm
IsJson.php17950664editdlrm
IsNan.php8280664editdlrm
IsNull.php8320664editdlrm
IsReadable.php14190664editdlrm
IsTrue.php8320664editdlrm
IsType.php33860664editdlrm
IsWritable.php14190664editdlrm
JsonMatches.php15190664editdlrm
LessThan.php11650664editdlrm
Not.php41310664editdlrm
ObjectHasAttribute.php8760664editdlrm
Or.php28000664editdlrm
PCREMatch.php14200664editdlrm
SameSize.php5410664editdlrm
StringContains.php18050664editdlrm
StringEndsWith.php11900664editdlrm
StringMatches.php22760664editdlrm
StringStartsWith.php11730664editdlrm
TraversableContains.php34360664editdlrm
TraversableContainsOnly.php24280664editdlrm
Xor.php29150664editdlrm
Edit: /var/www/vhosts/nabawater/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php (1795B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Constraint that asserts that a string is valid JSON. */ class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint { /** * Evaluates the constraint for parameter $other. Returns true if the * constraint is met, false otherwise. * * @param mixed $other Value or object to evaluate. * * @return bool */ protected function matches($other) { if ($other === '') { return false; } json_decode($other); if (json_last_error()) { return false; } return true; } /** * Returns the description of the failure * * The beginning of failure messages is "Failed asserting that" in most * cases. This method should return the second part of that sentence. * * @param mixed $other Evaluated value or object. * * @return string */ protected function failureDescription($other) { if ($other === '') { return 'an empty string is valid JSON'; } json_decode($other); $error = PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError( json_last_error() ); return sprintf( '%s is valid JSON (%s)', $this->exporter->shortenedExport($other), $error ); } /** * Returns a string representation of the constraint. * * @return string */ public function toString() { return 'is valid JSON'; } }