Permalink
Browse files

changed coding standards

  • Loading branch information...
1 parent 276a380 commit 4d8fc51112ba6df760ab2eba5db51e00cfd5c17d @fabpot committed May 11, 2010
Showing with 4,510 additions and 4,948 deletions.
  1. +15 −15 bin/create_pear_package.php
  2. +22 −23 lib/Twig/Autoloader.php
  3. +215 −228 lib/Twig/Compiler.php
  4. +14 −14 lib/Twig/CompilerInterface.php
  5. +290 −315 lib/Twig/Environment.php
  6. +380 −428 lib/Twig/ExpressionParser.php
  7. +35 −35 lib/Twig/Extension.php
  8. +198 −222 lib/Twig/Extension/Core.php
  9. +48 −48 lib/Twig/Extension/Escaper.php
  10. +18 −18 lib/Twig/Extension/I18n.php
  11. +62 −65 lib/Twig/Extension/Sandbox.php
  12. +30 −30 lib/Twig/ExtensionInterface.php
  13. +17 −17 lib/Twig/Filter.php
  14. +10 −10 lib/Twig/Filter/Function.php
  15. +11 −11 lib/Twig/Filter/Method.php
  16. +239 −268 lib/Twig/Lexer.php
  17. +9 −9 lib/Twig/LexerInterface.php
  18. +49 −52 lib/Twig/Loader/Array.php
  19. +91 −98 lib/Twig/Loader/Filesystem.php
  20. +32 −32 lib/Twig/Loader/String.php
  21. +23 −23 lib/Twig/LoaderInterface.php
  22. +20 −20 lib/Twig/Node.php
  23. +32 −33 lib/Twig/Node/AutoEscape.php
  24. +57 −59 lib/Twig/Node/Block.php
  25. +21 −21 lib/Twig/Node/BlockReference.php
  26. +25 −28 lib/Twig/Node/Debug.php
  27. +43 −47 lib/Twig/Node/Expression/Array.php
  28. +4 −4 lib/Twig/Node/Expression/AssignName.php
  29. +37 −39 lib/Twig/Node/Expression/Binary.php
  30. +4 −4 lib/Twig/Node/Expression/Binary/Add.php
  31. +4 −4 lib/Twig/Node/Expression/Binary/And.php
  32. +4 −4 lib/Twig/Node/Expression/Binary/Concat.php
  33. +4 −4 lib/Twig/Node/Expression/Binary/Div.php
  34. +14 −14 lib/Twig/Node/Expression/Binary/FloorDiv.php
  35. +4 −4 lib/Twig/Node/Expression/Binary/Mod.php
  36. +4 −4 lib/Twig/Node/Expression/Binary/Mul.php
  37. +4 −4 lib/Twig/Node/Expression/Binary/Or.php
  38. +4 −4 lib/Twig/Node/Expression/Binary/Sub.php
  39. +42 −49 lib/Twig/Node/Expression/Compare.php
  40. +22 −22 lib/Twig/Node/Expression/Conditional.php
  41. +18 −18 lib/Twig/Node/Expression/Constant.php
  42. +84 −94 lib/Twig/Node/Expression/Filter.php
  43. +49 −50 lib/Twig/Node/Expression/GetAttr.php
  44. +18 −18 lib/Twig/Node/Expression/Name.php
  45. +23 −24 lib/Twig/Node/Expression/Unary.php
  46. +4 −4 lib/Twig/Node/Expression/Unary/Neg.php
  47. +4 −4 lib/Twig/Node/Expression/Unary/Not.php
  48. +4 −4 lib/Twig/Node/Expression/Unary/Pos.php
  49. +36 −38 lib/Twig/Node/Filter.php
  50. +104 −112 lib/Twig/Node/For.php
  51. +71 −84 lib/Twig/Node/If.php
  52. +40 −40 lib/Twig/Node/Import.php
  53. +73 −85 lib/Twig/Node/Include.php
  54. +59 −63 lib/Twig/Node/Macro.php
  55. +191 −213 lib/Twig/Node/Module.php
  56. +17 −17 lib/Twig/Node/Parent.php
  57. +35 −36 lib/Twig/Node/Print.php
  58. +88 −106 lib/Twig/Node/Set.php
  59. +23 −23 lib/Twig/Node/Text.php
  60. +91 −106 lib/Twig/Node/Trans.php
  61. +27 −30 lib/Twig/NodeList.php
  62. +8 −8 lib/Twig/NodeListInterface.php
  63. +18 −21 lib/Twig/NodeTraverser.php
  64. +70 −95 lib/Twig/NodeVisitor/Escaper.php
  65. +37 −48 lib/Twig/NodeVisitor/Filter.php
  66. +30 −37 lib/Twig/NodeVisitor/Sandbox.php
  67. +2 −2 lib/Twig/NodeVisitorInterface.php
  68. +174 −190 lib/Twig/Parser.php
  69. +8 −8 lib/Twig/ParserInterface.php
  70. +51 −65 lib/Twig/Resource.php
  71. +58 −68 lib/Twig/Sandbox/SecurityPolicy.php
  72. +3 −3 lib/Twig/Sandbox/SecurityPolicyInterface.php
  73. +24 −24 lib/Twig/SyntaxError.php
  74. +18 −21 lib/Twig/Template.php
  75. +20 −20 lib/Twig/TemplateInterface.php
  76. +93 −95 lib/Twig/Token.php
  77. +7 −7 lib/Twig/TokenParser.php
  78. +26 −29 lib/Twig/TokenParser/AutoEscape.php
  79. +37 −43 lib/Twig/TokenParser/Block.php
  80. +14 −15 lib/Twig/TokenParser/Debug.php
  81. +13 −14 lib/Twig/TokenParser/Display.php
  82. +12 −13 lib/Twig/TokenParser/Extends.php
  83. +17 −17 lib/Twig/TokenParser/Filter.php
  84. +33 −37 lib/Twig/TokenParser/For.php
  85. +47 −51 lib/Twig/TokenParser/If.php
  86. +12 −12 lib/Twig/TokenParser/Import.php
  87. +20 −22 lib/Twig/TokenParser/Include.php
  88. +19 −19 lib/Twig/TokenParser/Macro.php
  89. +11 −12 lib/Twig/TokenParser/Parent.php
  90. +31 −36 lib/Twig/TokenParser/Set.php
  91. +32 −35 lib/Twig/TokenParser/Trans.php
  92. +123 −131 lib/Twig/TokenStream.php
  93. +7 −7 test/Twig/Tests/AutoloaderTest.php
  94. +90 −105 test/Twig/Tests/Extension/SandboxTest.php
  95. +55 −59 test/Twig/Tests/TokenStreamTest.php
  96. +74 −81 test/Twig/Tests/integrationTest.php
@@ -2,32 +2,32 @@
if (!isset($argv[1]))
{
- die('You must provide the version (1.0.0)');
+ die('You must provide the version (1.0.0)');
}
if (!isset($argv[2]))
{
- die('You must provide the stability (alpha, beta, or stable)');
+ die('You must provide the stability (alpha, beta, or stable)');
}
$context = array(
- 'date' => date('Y-m-d'),
- 'time' => date('H:m:00'),
- 'version' => $argv[1],
- 'api_version' => $argv[1],
- 'stability' => $argv[2],
- 'api_stability' => $argv[2],
+ 'date' => date('Y-m-d'),
+ 'time' => date('H:m:00'),
+ 'version' => $argv[1],
+ 'api_version' => $argv[1],
+ 'stability' => $argv[2],
+ 'api_stability' => $argv[2],
);
$context['files'] = '';
$path = realpath(dirname(__FILE__).'/../lib/Twig');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file)
{
- if (preg_match('/\.php$/', $file))
- {
- $name = str_replace($path.'/', '', $file);
- $context['files'] .= ' <file install-as="Twig/'.$name.'" name="'.$name.'" role="php" />'."\n";
- }
+ if (preg_match('/\.php$/', $file))
+ {
+ $name = str_replace($path.'/', '', $file);
+ $context['files'] .= ' <file install-as="Twig/'.$name.'" name="'.$name.'" role="php" />'."\n";
+ }
}
$template = file_get_contents(dirname(__FILE__).'/../package.xml.tpl');
@@ -36,7 +36,7 @@
function replace_parameters($matches)
{
- global $context;
+ global $context;
- return isset($context[$matches[1]]) ? $context[$matches[1]] : null;
+ return isset($context[$matches[1]]) ? $context[$matches[1]] : null;
}
View
@@ -18,31 +18,30 @@
*/
class Twig_Autoloader
{
- /**
- * Registers Twig_Autoloader as an SPL autoloader.
- */
- static public function register()
- {
- ini_set('unserialize_callback_func', 'spl_autoload_call');
- spl_autoload_register(array(new self, 'autoload'));
- }
-
- /**
- * Handles autoloading of classes.
- *
- * @param string $class A class name.
- *
- * @return boolean Returns true if the class has been loaded
- */
- static public function autoload($class)
- {
- if (0 !== strpos($class, 'Twig'))
+ /**
+ * Registers Twig_Autoloader as an SPL autoloader.
+ */
+ static public function register()
{
- return false;
+ ini_set('unserialize_callback_func', 'spl_autoload_call');
+ spl_autoload_register(array(new self, 'autoload'));
}
- require dirname(__FILE__).'/../'.str_replace('_', '/', $class).'.php';
+ /**
+ * Handles autoloading of classes.
+ *
+ * @param string $class A class name.
+ *
+ * @return boolean Returns true if the class has been loaded
+ */
+ static public function autoload($class)
+ {
+ if (0 !== strpos($class, 'Twig')) {
+ return false;
+ }
+
+ require dirname(__FILE__).'/../'.str_replace('_', '/', $class).'.php';
- return true;
- }
+ return true;
+ }
}
Oops, something went wrong.

0 comments on commit 4d8fc51

Please sign in to comment.