Permalink
Browse files

bug #2507 Move class_exists() at the bottom of files (nicolas-grekas)

This PR was merged into the 1.x branch.

Discussion
----------

Move class_exists() at the bottom of files

Fixes #2503
Closes #2506

Commits
-------

95e912b Move class_exists() at the bottom of files
  • Loading branch information...
fabpot committed Jun 7, 2017
2 parents c071a2e + 95e912b commit a9fe0a91660e49936ff069a71c8507ddec370a9e
@@ -9,9 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Environment');
class_exists('Twig_Node');
/**
* Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.
*
@@ -53,3 +50,5 @@ class_exists('Twig_Node');
}
class_alias('Twig_BaseNodeVisitor', 'Twig\NodeVisitor\AbstractNodeVisitor', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
View
@@ -10,8 +10,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Node');
/**
* Compiles a node to PHP code.
*
@@ -283,3 +281,4 @@ public function getVarName()
}
class_alias('Twig_Compiler', 'Twig\Compiler', false);
class_exists('Twig_Node');
View
@@ -9,8 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Source');
/**
* Twig base exception.
*
@@ -362,3 +360,4 @@ protected function guessTemplateInfo()
}
class_alias('Twig_Error', 'Twig\Error\Error', false);
class_exists('Twig_Source');
View
@@ -9,8 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Environment');
abstract class Twig_Extension implements Twig_ExtensionInterface
{
/**
@@ -68,3 +66,4 @@ public function getName()
}
class_alias('Twig_Extension', 'Twig\Extension\AbstractExtension', false);
class_exists('Twig_Environment');
@@ -9,8 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Profiler_Profile');
class Twig_Extension_Profiler extends Twig_Extension
{
private $actives = array();
@@ -48,3 +46,4 @@ public function getName()
}
class_alias('Twig_Extension_Profiler', 'Twig\Extension\ProfilerExtension', false);
class_exists('Twig_Profiler_Profile');
@@ -9,8 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Environment');
/**
* Interface implemented by extension classes.
*
@@ -89,3 +87,4 @@ public function getName();
}
class_alias('Twig_ExtensionInterface', 'Twig\Extension\ExtensionInterface', false);
class_exists('Twig_Environment');
View
@@ -10,8 +10,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Compiler');
/**
* Represents a node in the AST.
*
@@ -255,3 +253,4 @@ public function getFilename()
}
class_alias('Twig_Node', 'Twig\Node\Node', false);
class_exists('Twig_Compiler');
@@ -9,9 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Environment');
class_exists('Twig_Node');
/**
* Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.
*
@@ -44,3 +41,5 @@ public function getPriority();
}
class_alias('Twig_NodeVisitorInterface', 'Twig\NodeVisitor\NodeVisitorInterface', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
View
@@ -10,9 +10,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Node');
class_exists('Twig_TokenStream');
/**
* Default parser implementation.
*
@@ -409,3 +406,5 @@ protected function filterBodyNodes(Twig_NodeInterface $node)
}
class_alias('Twig_Parser', 'Twig\Parser', false);
class_exists('Twig_Node');
class_exists('Twig_TokenStream');
@@ -9,9 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Environment');
class_exists('Twig_Node');
use PHPUnit\Framework\TestCase;
abstract class Twig_Test_NodeTestCase extends TestCase
@@ -74,3 +71,5 @@ protected function getAttributeGetter()
}
class_alias('Twig_Test_NodeTestCase', 'Twig\Test\NodeTestCase', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
@@ -9,9 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Parser');
class_exists('Twig_Token');
/**
* Interface implemented by token parsers.
*
@@ -42,3 +39,5 @@ public function getTag();
}
class_alias('Twig_TokenParserInterface', 'Twig\TokenParser\TokenParserInterface', false);
class_exists('Twig_Parser');
class_exists('Twig_Token');

0 comments on commit a9fe0a9

Please sign in to comment.