Update v1.0.6.5

This commit is contained in:
sujitprasad
2016-03-02 12:25:21 +05:30
parent 7011553462
commit c56ff86194
218 changed files with 17161 additions and 2358 deletions

View File

@@ -37,10 +37,10 @@ class ReturnArgumentPromise implements PromiseInterface
public function __construct($index = 0)
{
if (!is_int($index) || $index < 0) {
throw new InvalidArgumentException(
throw new InvalidArgumentException(sprintf(
'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.',
$index
);
));
}
$this->index = $index;
}

View File

@@ -46,13 +46,13 @@ class ThrowPromise implements PromiseInterface
&& !is_subclass_of($exception, 'Exception')) {
throw new InvalidArgumentException(sprintf(
'Exception class or instance expected as argument to ThrowPromise, but got %s.',
gettype($exception)
$exception
));
}
} elseif (!$exception instanceof \Exception) {
throw new InvalidArgumentException(sprintf(
'Exception class or instance expected as argument to ThrowPromise, but got %s.',
gettype($exception)
is_object($exception) ? get_class($exception) : gettype($exception)
));
}