Skip to content

Commit cf8ed5b

Browse files
committed
Import ReflectionFunction instead of using fully qualified name
1 parent 2ebbea9 commit cf8ed5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/php/com/amazon/aws/lambda/Handler.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php namespace com\amazon\aws\lambda;
22

3+
use ReflectionFunction;
34
use lang\IllegalArgumentException;
45

56
/**
@@ -34,7 +35,7 @@ public final function invokeable($api) {
3435
if ($target instanceof Lambda) {
3536
return new Invokeable([$target, 'process'], $api->buffered());
3637
} else if (is_callable($target)) {
37-
$n= (new \ReflectionFunction($target))->getNumberOfParameters();
38+
$n= (new ReflectionFunction($target))->getNumberOfParameters();
3839
return new Invokeable($target, $n < 3 ? $api->buffered() : $api->streaming());
3940
} else {
4041
throw new IllegalArgumentException('Expected either a callable or a Lambda instance, have '.typeof($target));

0 commit comments

Comments
 (0)