mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-27 08:38:46 +00:00
24 lines
494 B
PHP
24 lines
494 B
PHP
<?php
|
|
|
|
namespace PhpAmqpLib\Helper;
|
|
|
|
use InvalidArgumentException;
|
|
|
|
class Assert
|
|
{
|
|
/**
|
|
* @param mixed $argument
|
|
* @throws \InvalidArgumentException
|
|
*/
|
|
public static function isCallable($argument)
|
|
{
|
|
if (!is_callable($argument)) {
|
|
throw new InvalidArgumentException(sprintf(
|
|
'Given argument "%s" should be callable. %s type was given.',
|
|
$argument,
|
|
gettype($argument)
|
|
));
|
|
}
|
|
}
|
|
}
|