File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public static function from($from)
69
69
{
70
70
$ from = $ from instanceof \ReflectionClass ? $ from : new \ReflectionClass ($ from );
71
71
$ class = new static ($ from ->getShortName ());
72
- $ class ->type = $ from ->isInterface () ? 'interface ' : (PHP_VERSION_ID >= 50400 && $ from ->isTrait () ? 'trait ' : 'class ' );
72
+ $ class ->type = $ from ->isInterface () ? 'interface ' : ($ from ->isTrait () ? 'trait ' : 'class ' );
73
73
$ class ->final = $ from ->isFinal () && $ class ->type === 'class ' ;
74
74
$ class ->abstract = $ from ->isAbstract () && $ class ->type === 'class ' ;
75
75
$ class ->implements = $ from ->getInterfaceNames ();
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public static function from(\ReflectionParameter $from)
51
51
}
52
52
}
53
53
$ param ->optional = PHP_VERSION_ID < 50407 ? $ from ->isOptional () || ($ param ->typeHint && $ from ->allowsNull ()) : $ from ->isDefaultValueAvailable ();
54
- $ param ->defaultValue = ( PHP_VERSION_ID === 50316 ? $ from ->isOptional () : $ from -> isDefaultValueAvailable () ) ? $ from ->getDefaultValue () : NULL ;
54
+ $ param ->defaultValue = $ from ->isDefaultValueAvailable () ? $ from ->getDefaultValue () : NULL ;
55
55
56
56
$ namespace = $ from ->getDeclaringClass ()->getNamespaceName ();
57
57
$ namespace = $ namespace ? "\\$ namespace \\" : "\\" ;
Original file line number Diff line number Diff line change 2
2
3
3
/**
4
4
* Test: Nette\PhpGenerator generator.
5
- * @phpversion 5.4
6
5
*/
7
6
8
7
use Nette \PhpGenerator \ClassType ,
You can’t perform that action at this time.
0 commit comments