1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<?php
namespace Hamcrest\Type;
/*
Copyright (c) 2010 hamcrest.org
*/
use Hamcrest\Core\IsTypeOf;
/**
* Tests whether the value is callable.
*/
class IsCallable extends IsTypeOf
{
/**
* Creates a new instance of IsCallable
*/
public function __construct()
{
parent::__construct('callable');
}
public function matches($item)
{
return is_callable($item);
}
/**
* Is the value callable?
*
* @factory
*/
public static function callableValue()
{
return new self;
}
}
|