Skip to content

Commit 81b2937

Browse files
committed
ClassType, Method::from() silently deprecated support for reflection objects
1 parent 320a864 commit 81b2937

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/PhpGenerator/ClassType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ class ClassType
6565

6666

6767
/**
68-
* @param \ReflectionClass|string
68+
* @param string|object
6969
* @return static
7070
*/
71-
public static function from($from)
71+
public static function from($class)
7272
{
7373
return (new Factory)->fromClassReflection(
74-
$from instanceof \ReflectionClass ? $from : new \ReflectionClass($from)
74+
$class instanceof \ReflectionClass ? $class : new \ReflectionClass($class)
7575
);
7676
}
7777

src/PhpGenerator/Method.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class Method extends Member
5252

5353

5454
/**
55-
* @param \ReflectionFunctionAbstract|callable
55+
* @param callable
5656
* @return static
5757
*/
58-
public static function from($from)
58+
public static function from($method)
5959
{
6060
return (new Factory)->fromFunctionReflection(
61-
$from instanceof \ReflectionFunctionAbstract ? $from : Nette\Utils\Callback::toReflection($from)
61+
$method instanceof \ReflectionFunctionAbstract ? $method : Nette\Utils\Callback::toReflection($method)
6262
);
6363
}
6464

0 commit comments

Comments
 (0)