Move class_exists() at the bottom of files

This commit is contained in:
Nicolas Grekas
2017-06-07 17:54:42 +02:00
parent c071a2e36c
commit 95e912b002
11 changed files with 16 additions and 27 deletions
+2 -3
View File
@@ -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 @@ abstract class Twig_BaseNodeVisitor implements Twig_NodeVisitorInterface
}
class_alias('Twig_BaseNodeVisitor', 'Twig\NodeVisitor\AbstractNodeVisitor', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
+1 -2
View File
@@ -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 @@ class Twig_Compiler implements Twig_CompilerInterface
}
class_alias('Twig_Compiler', 'Twig\Compiler', false);
class_exists('Twig_Node');
+1 -2
View File
@@ -9,8 +9,6 @@
* file that was distributed with this source code.
*/
class_exists('Twig_Source');
/**
* Twig base exception.
*
@@ -362,3 +360,4 @@ class Twig_Error extends Exception
}
class_alias('Twig_Error', 'Twig\Error\Error', false);
class_exists('Twig_Source');
+1 -2
View File
@@ -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 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
}
class_alias('Twig_Extension', 'Twig\Extension\AbstractExtension', false);
class_exists('Twig_Environment');
+1 -2
View File
@@ -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 @@ class Twig_Extension_Profiler extends Twig_Extension
}
class_alias('Twig_Extension_Profiler', 'Twig\Extension\ProfilerExtension', false);
class_exists('Twig_Profiler_Profile');
+1 -2
View File
@@ -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 @@ interface Twig_ExtensionInterface
}
class_alias('Twig_ExtensionInterface', 'Twig\Extension\ExtensionInterface', false);
class_exists('Twig_Environment');
+1 -2
View File
@@ -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 @@ class Twig_Node implements Twig_NodeInterface
}
class_alias('Twig_Node', 'Twig\Node\Node', false);
class_exists('Twig_Compiler');
+2 -3
View File
@@ -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 @@ interface Twig_NodeVisitorInterface
}
class_alias('Twig_NodeVisitorInterface', 'Twig\NodeVisitor\NodeVisitorInterface', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
+2 -3
View File
@@ -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 @@ class Twig_Parser implements Twig_ParserInterface
}
class_alias('Twig_Parser', 'Twig\Parser', false);
class_exists('Twig_Node');
class_exists('Twig_TokenStream');
+2 -3
View File
@@ -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 @@ abstract class Twig_Test_NodeTestCase extends TestCase
}
class_alias('Twig_Test_NodeTestCase', 'Twig\Test\NodeTestCase', false);
class_exists('Twig_Environment');
class_exists('Twig_Node');
+2 -3
View File
@@ -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 @@ interface Twig_TokenParserInterface
}
class_alias('Twig_TokenParserInterface', 'Twig\TokenParser\TokenParserInterface', false);
class_exists('Twig_Parser');
class_exists('Twig_Token');