Page MenuHomeWickedGov Phorge

IsNull.php
No OneTemporary

Size
976 B
Referenced Files
None
Subscribers
None

IsNull.php

<?php
namespace Hamcrest\Core;
/*
Copyright (c) 2009 hamcrest.org
*/
use Hamcrest\BaseMatcher;
use Hamcrest\Description;
/**
* Is the value null?
*/
class IsNull extends BaseMatcher
{
private static $_INSTANCE;
private static $_NOT_INSTANCE;
public function matches($item)
{
return is_null($item);
}
public function describeTo(Description $description)
{
$description->appendText('null');
}
/**
* Matches if value is null.
*
* @factory
*/
public static function nullValue()
{
if (!self::$_INSTANCE) {
self::$_INSTANCE = new self();
}
return self::$_INSTANCE;
}
/**
* Matches if value is not null.
*
* @factory
*/
public static function notNullValue()
{
if (!self::$_NOT_INSTANCE) {
self::$_NOT_INSTANCE = IsNot::not(self::nullValue());
}
return self::$_NOT_INSTANCE;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 20:10 (2 h, 53 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cf/29/80f5447eecb28046337b5eb68c9a
Default Alt Text
IsNull.php (976 B)

Event Timeline