We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ebbea9 commit cf8ed5bCopy full SHA for cf8ed5b
src/main/php/com/amazon/aws/lambda/Handler.class.php
@@ -1,5 +1,6 @@
1
<?php namespace com\amazon\aws\lambda;
2
3
+use ReflectionFunction;
4
use lang\IllegalArgumentException;
5
6
/**
@@ -34,7 +35,7 @@ public final function invokeable($api) {
34
35
if ($target instanceof Lambda) {
36
return new Invokeable([$target, 'process'], $api->buffered());
37
} else if (is_callable($target)) {
- $n= (new \ReflectionFunction($target))->getNumberOfParameters();
38
+ $n= (new ReflectionFunction($target))->getNumberOfParameters();
39
return new Invokeable($target, $n < 3 ? $api->buffered() : $api->streaming());
40
} else {
41
throw new IllegalArgumentException('Expected either a callable or a Lambda instance, have '.typeof($target));
0 commit comments