8000
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 803b06b commit 7b2e3d9Copy full SHA for 7b2e3d9
src/Symfony/Component/ClassLoader/ClassMapGenerator.php
@@ -11,6 +11,10 @@
11
12
namespace Symfony\Component\ClassLoader;
13
14
+if (!defined('T_TRAIT')) {
15
+ define('T_TRAIT', 0);
16
+}
17
+
18
/**
19
* ClassMapGenerator
20
*
@@ -84,7 +88,6 @@ private static function findClasses($path)
84
88
{
85
89
$contents = file_get_contents($path);
86
90
$tokens = token_get_all($contents);
87
- $T_TRAIT = version_compare(PHP_VERSION, '5.4', '<') ? -1 : T_TRAIT;
91
92
$classes = array();
93
@@ -111,7 +114,7 @@ private static function findClasses($path)
111
114
break;
112
115
case T_CLASS:
113
116
case T_INTERFACE:
- case $T_TRAIT:
117
+ case T_TRAIT:
118
// Find the classname
119
while (($t = $tokens[++$i]) && is_array($t)) {
120
if (T_STRING === $t[0]) {
0 commit comments