diff --git a/lib/PhpParser/Autoloader.php b/lib/PhpParser/Autoloader.php index 4b28aa1..4498bc5 100644 --- a/lib/PhpParser/Autoloader.php +++ b/lib/PhpParser/Autoloader.php @@ -24,7 +24,7 @@ class Autoloader */ static public function autoload($class) { if (0 === strpos($class, 'PhpParser\\')) { - $fileName = dirname(__DIR__) . '/' . rtrim(strtr($class, '\\', '/'), '_') . '.php'; + $fileName = dirname(__DIR__) . '/' . strtr($class, '\\', '/') . '.php'; if (file_exists($fileName)) { require $fileName; } diff --git a/lib/PhpParser/Builder/Class.php b/lib/PhpParser/Builder/Class_.php similarity index 100% rename from lib/PhpParser/Builder/Class.php rename to lib/PhpParser/Builder/Class_.php diff --git a/lib/PhpParser/Builder/Function.php b/lib/PhpParser/Builder/Function_.php similarity index 100% rename from lib/PhpParser/Builder/Function.php rename to lib/PhpParser/Builder/Function_.php diff --git a/lib/PhpParser/Builder/Interface.php b/lib/PhpParser/Builder/Interface_.php similarity index 100% rename from lib/PhpParser/Builder/Interface.php rename to lib/PhpParser/Builder/Interface_.php diff --git a/lib/PhpParser/Node/Const.php b/lib/PhpParser/Node/Const_.php similarity index 100% rename from lib/PhpParser/Node/Const.php rename to lib/PhpParser/Node/Const_.php diff --git a/lib/PhpParser/Node/Expr/Array.php b/lib/PhpParser/Node/Expr/Array_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Array.php rename to lib/PhpParser/Node/Expr/Array_.php diff --git a/lib/PhpParser/Node/Expr/Cast/Array.php b/lib/PhpParser/Node/Expr/Cast/Array_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Cast/Array.php rename to lib/PhpParser/Node/Expr/Cast/Array_.php diff --git a/lib/PhpParser/Node/Expr/Cast/Unset.php b/lib/PhpParser/Node/Expr/Cast/Unset_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Cast/Unset.php rename to lib/PhpParser/Node/Expr/Cast/Unset_.php diff --git a/lib/PhpParser/Node/Expr/Clone.php b/lib/PhpParser/Node/Expr/Clone_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Clone.php rename to lib/PhpParser/Node/Expr/Clone_.php diff --git a/lib/PhpParser/Node/Expr/Empty.php b/lib/PhpParser/Node/Expr/Empty_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Empty.php rename to lib/PhpParser/Node/Expr/Empty_.php diff --git a/lib/PhpParser/Node/Expr/Eval.php b/lib/PhpParser/Node/Expr/Eval_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Eval.php rename to lib/PhpParser/Node/Expr/Eval_.php diff --git a/lib/PhpParser/Node/Expr/Exit.php b/lib/PhpParser/Node/Expr/Exit_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Exit.php rename to lib/PhpParser/Node/Expr/Exit_.php diff --git a/lib/PhpParser/Node/Expr/Include.php b/lib/PhpParser/Node/Expr/Include_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Include.php rename to lib/PhpParser/Node/Expr/Include_.php diff --git a/lib/PhpParser/Node/Expr/Instanceof.php b/lib/PhpParser/Node/Expr/Instanceof_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Instanceof.php rename to lib/PhpParser/Node/Expr/Instanceof_.php diff --git a/lib/PhpParser/Node/Expr/Isset.php b/lib/PhpParser/Node/Expr/Isset_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Isset.php rename to lib/PhpParser/Node/Expr/Isset_.php diff --git a/lib/PhpParser/Node/Expr/List.php b/lib/PhpParser/Node/Expr/List_.php similarity index 100% rename from lib/PhpParser/Node/Expr/List.php rename to lib/PhpParser/Node/Expr/List_.php diff --git a/lib/PhpParser/Node/Expr/New.php b/lib/PhpParser/Node/Expr/New_.php similarity index 100% rename from lib/PhpParser/Node/Expr/New.php rename to lib/PhpParser/Node/Expr/New_.php diff --git a/lib/PhpParser/Node/Expr/Print.php b/lib/PhpParser/Node/Expr/Print_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Print.php rename to lib/PhpParser/Node/Expr/Print_.php diff --git a/lib/PhpParser/Node/Expr/Yield.php b/lib/PhpParser/Node/Expr/Yield_.php similarity index 100% rename from lib/PhpParser/Node/Expr/Yield.php rename to lib/PhpParser/Node/Expr/Yield_.php diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Class.php b/lib/PhpParser/Node/Scalar/MagicConst/Class_.php similarity index 100% rename from lib/PhpParser/Node/Scalar/MagicConst/Class.php rename to lib/PhpParser/Node/Scalar/MagicConst/Class_.php diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Function.php b/lib/PhpParser/Node/Scalar/MagicConst/Function_.php similarity index 100% rename from lib/PhpParser/Node/Scalar/MagicConst/Function.php rename to lib/PhpParser/Node/Scalar/MagicConst/Function_.php diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Namespace.php b/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php similarity index 100% rename from lib/PhpParser/Node/Scalar/MagicConst/Namespace.php rename to lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Trait.php b/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php similarity index 100% rename from lib/PhpParser/Node/Scalar/MagicConst/Trait.php rename to lib/PhpParser/Node/Scalar/MagicConst/Trait_.php diff --git a/lib/PhpParser/Node/Stmt/Break.php b/lib/PhpParser/Node/Stmt/Break_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Break.php rename to lib/PhpParser/Node/Stmt/Break_.php diff --git a/lib/PhpParser/Node/Stmt/Case.php b/lib/PhpParser/Node/Stmt/Case_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Case.php rename to lib/PhpParser/Node/Stmt/Case_.php diff --git a/lib/PhpParser/Node/Stmt/Catch.php b/lib/PhpParser/Node/Stmt/Catch_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Catch.php rename to lib/PhpParser/Node/Stmt/Catch_.php diff --git a/lib/PhpParser/Node/Stmt/Class.php b/lib/PhpParser/Node/Stmt/Class_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Class.php rename to lib/PhpParser/Node/Stmt/Class_.php diff --git a/lib/PhpParser/Node/Stmt/Const.php b/lib/PhpParser/Node/Stmt/Const_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Const.php rename to lib/PhpParser/Node/Stmt/Const_.php diff --git a/lib/PhpParser/Node/Stmt/Continue.php b/lib/PhpParser/Node/Stmt/Continue_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Continue.php rename to lib/PhpParser/Node/Stmt/Continue_.php diff --git a/lib/PhpParser/Node/Stmt/Declare.php b/lib/PhpParser/Node/Stmt/Declare_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Declare.php rename to lib/PhpParser/Node/Stmt/Declare_.php diff --git a/lib/PhpParser/Node/Stmt/Do.php b/lib/PhpParser/Node/Stmt/Do_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Do.php rename to lib/PhpParser/Node/Stmt/Do_.php diff --git a/lib/PhpParser/Node/Stmt/Echo.php b/lib/PhpParser/Node/Stmt/Echo_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Echo.php rename to lib/PhpParser/Node/Stmt/Echo_.php diff --git a/lib/PhpParser/Node/Stmt/ElseIf.php b/lib/PhpParser/Node/Stmt/ElseIf_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/ElseIf.php rename to lib/PhpParser/Node/Stmt/ElseIf_.php diff --git a/lib/PhpParser/Node/Stmt/Else.php b/lib/PhpParser/Node/Stmt/Else_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Else.php rename to lib/PhpParser/Node/Stmt/Else_.php diff --git a/lib/PhpParser/Node/Stmt/For.php b/lib/PhpParser/Node/Stmt/For_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/For.php rename to lib/PhpParser/Node/Stmt/For_.php diff --git a/lib/PhpParser/Node/Stmt/Foreach.php b/lib/PhpParser/Node/Stmt/Foreach_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Foreach.php rename to lib/PhpParser/Node/Stmt/Foreach_.php diff --git a/lib/PhpParser/Node/Stmt/Function.php b/lib/PhpParser/Node/Stmt/Function_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Function.php rename to lib/PhpParser/Node/Stmt/Function_.php diff --git a/lib/PhpParser/Node/Stmt/Global.php b/lib/PhpParser/Node/Stmt/Global_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Global.php rename to lib/PhpParser/Node/Stmt/Global_.php diff --git a/lib/PhpParser/Node/Stmt/Goto.php b/lib/PhpParser/Node/Stmt/Goto_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Goto.php rename to lib/PhpParser/Node/Stmt/Goto_.php diff --git a/lib/PhpParser/Node/Stmt/If.php b/lib/PhpParser/Node/Stmt/If_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/If.php rename to lib/PhpParser/Node/Stmt/If_.php diff --git a/lib/PhpParser/Node/Stmt/Interface.php b/lib/PhpParser/Node/Stmt/Interface_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Interface.php rename to lib/PhpParser/Node/Stmt/Interface_.php diff --git a/lib/PhpParser/Node/Stmt/Namespace.php b/lib/PhpParser/Node/Stmt/Namespace_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Namespace.php rename to lib/PhpParser/Node/Stmt/Namespace_.php diff --git a/lib/PhpParser/Node/Stmt/Return.php b/lib/PhpParser/Node/Stmt/Return_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Return.php rename to lib/PhpParser/Node/Stmt/Return_.php diff --git a/lib/PhpParser/Node/Stmt/Static.php b/lib/PhpParser/Node/Stmt/Static_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Static.php rename to lib/PhpParser/Node/Stmt/Static_.php diff --git a/lib/PhpParser/Node/Stmt/Switch.php b/lib/PhpParser/Node/Stmt/Switch_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Switch.php rename to lib/PhpParser/Node/Stmt/Switch_.php diff --git a/lib/PhpParser/Node/Stmt/Throw.php b/lib/PhpParser/Node/Stmt/Throw_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Throw.php rename to lib/PhpParser/Node/Stmt/Throw_.php diff --git a/lib/PhpParser/Node/Stmt/Trait.php b/lib/PhpParser/Node/Stmt/Trait_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Trait.php rename to lib/PhpParser/Node/Stmt/Trait_.php diff --git a/lib/PhpParser/Node/Stmt/Unset.php b/lib/PhpParser/Node/Stmt/Unset_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Unset.php rename to lib/PhpParser/Node/Stmt/Unset_.php diff --git a/lib/PhpParser/Node/Stmt/Use.php b/lib/PhpParser/Node/Stmt/Use_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/Use.php rename to lib/PhpParser/Node/Stmt/Use_.php diff --git a/lib/PhpParser/Node/Stmt/While.php b/lib/PhpParser/Node/Stmt/While_.php similarity index 100% rename from lib/PhpParser/Node/Stmt/While.php rename to lib/PhpParser/Node/Stmt/While_.php