Skip to content

Commit fe6f2ff

Browse files
committed
removed support for PHP 5.3
1 parent e633233 commit fe6f2ff

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/PhpGenerator/ClassType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function from($from)
6969
{
7070
$from = $from instanceof \ReflectionClass ? $from : new \ReflectionClass($from);
7171
$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');
7373
$class->final = $from->isFinal() && $class->type === 'class';
7474
$class->abstract = $from->isAbstract() && $class->type === 'class';
7575
$class->implements = $from->getInterfaceNames();

src/PhpGenerator/Parameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function from(\ReflectionParameter $from)
5151
}
5252
}
5353
$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;
5555

5656
$namespace = $from->getDeclaringClass()->getNamespaceName();
5757
$namespace = $namespace ? "\\$namespace\\" : "\\";

tests/PhpGenerator/ClassType.from.trait.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* Test: Nette\PhpGenerator generator.
5-
* @phpversion 5.4
65
*/
76

87
use Nette\PhpGenerator\ClassType,

0 commit comments

Comments
 (0)