Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5968889
TypeSafeDiagnosingMatcher.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
841 B
Referenced Files
None
Subscribers
None
TypeSafeDiagnosingMatcher.php
View Options
<?php
namespace
Hamcrest
;
/**
* Convenient base class for Matchers that require a value of a specific type.
* This simply checks the type and then casts.
*/
abstract
class
TypeSafeDiagnosingMatcher
extends
TypeSafeMatcher
{
final
public
function
matchesSafely
(
$item
)
{
return
$this
->
matchesSafelyWithDiagnosticDescription
(
$item
,
new
NullDescription
());
}
final
public
function
describeMismatchSafely
(
$item
,
Description
$mismatchDescription
)
{
$this
->
matchesSafelyWithDiagnosticDescription
(
$item
,
$mismatchDescription
);
}
// -- Protected Methods
/**
* Subclasses should implement these. The item will already have been checked for
* the specific type.
*/
abstract
protected
function
matchesSafelyWithDiagnosticDescription
(
$item
,
Description
$mismatchDescription
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 13:22 (1 d, 17 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
80/41/0e890cf3ba5d9e6cff90a9142da9
Default Alt Text
TypeSafeDiagnosingMatcher.php (841 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment