Przeglądaj źródła

Merge branch 'release/2.11.0'

Justin Hileman 9 lat temu
rodzic
commit
789904e952
100 zmienionych plików z 574 dodań i 164 usunięć
  1. 3 7
      .travis.yml
  2. 1 0
      README.md
  3. 1 1
      bin/build_bootstrap.php
  4. 1 1
      composer.json
  5. 1 1
      src/Mustache/Autoloader.php
  6. 1 1
      src/Mustache/Cache.php
  7. 1 1
      src/Mustache/Cache/AbstractCache.php
  8. 3 3
      src/Mustache/Cache/FilesystemCache.php
  9. 1 1
      src/Mustache/Cache/NoopCache.php
  10. 12 9
      src/Mustache/Compiler.php
  11. 3 3
      src/Mustache/Context.php
  12. 4 4
      src/Mustache/Engine.php
  13. 1 1
      src/Mustache/Exception.php
  14. 1 1
      src/Mustache/Exception/InvalidArgumentException.php
  15. 1 1
      src/Mustache/Exception/LogicException.php
  16. 1 1
      src/Mustache/Exception/RuntimeException.php
  17. 10 5
      src/Mustache/Exception/SyntaxException.php
  18. 10 4
      src/Mustache/Exception/UnknownFilterException.php
  19. 10 4
      src/Mustache/Exception/UnknownHelperException.php
  20. 10 4
      src/Mustache/Exception/UnknownTemplateException.php
  21. 3 3
      src/Mustache/HelperCollection.php
  22. 5 5
      src/Mustache/LambdaHelper.php
  23. 2 2
      src/Mustache/Loader.php
  24. 2 2
      src/Mustache/Loader/ArrayLoader.php
  25. 2 2
      src/Mustache/Loader/CascadingLoader.php
  26. 17 6
      src/Mustache/Loader/FilesystemLoader.php
  27. 3 3
      src/Mustache/Loader/InlineLoader.php
  28. 1 1
      src/Mustache/Loader/MutableLoader.php
  29. 1 1
      src/Mustache/Loader/StringLoader.php
  30. 1 1
      src/Mustache/Logger.php
  31. 1 1
      src/Mustache/Logger/AbstractLogger.php
  32. 7 7
      src/Mustache/Logger/StreamLogger.php
  33. 6 6
      src/Mustache/Parser.php
  34. 1 1
      src/Mustache/Template.php
  35. 2 2
      src/Mustache/Tokenizer.php
  36. 1 1
      test/Mustache/Test/AutoloaderTest.php
  37. 1 1
      test/Mustache/Test/Cache/AbstractCacheTest.php
  38. 1 1
      test/Mustache/Test/Cache/FilesystemCacheTest.php
  39. 1 1
      test/Mustache/Test/CompilerTest.php
  40. 1 1
      test/Mustache/Test/ContextTest.php
  41. 2 2
      test/Mustache/Test/EngineTest.php
  42. 13 1
      test/Mustache/Test/Exception/SyntaxExceptionTest.php
  43. 13 1
      test/Mustache/Test/Exception/UnknownFilterExceptionTest.php
  44. 12 1
      test/Mustache/Test/Exception/UnknownHelperExceptionTest.php
  45. 12 1
      test/Mustache/Test/Exception/UnknownTemplateExceptionTest.php
  46. 4 2
      test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php
  47. 1 1
      test/Mustache/Test/FiveThree/Functional/EngineTest.php
  48. 40 16
      test/Mustache/Test/FiveThree/Functional/FiltersTest.php
  49. 1 1
      test/Mustache/Test/FiveThree/Functional/HigherOrderSectionsTest.php
  50. 1 1
      test/Mustache/Test/FiveThree/Functional/LambdaHelperTest.php
  51. 1 1
      test/Mustache/Test/FiveThree/Functional/MustacheSpecTest.php
  52. 7 7
      test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php
  53. 7 3
      test/Mustache/Test/FiveThree/Functional/StrictCallablesTest.php
  54. 2 1
      test/Mustache/Test/Functional/CallTest.php
  55. 1 1
      test/Mustache/Test/Functional/ExamplesTest.php
  56. 1 1
      test/Mustache/Test/Functional/HigherOrderSectionsTest.php
  57. 18 0
      test/Mustache/Test/Functional/InheritanceTest.php
  58. 1 1
      test/Mustache/Test/Functional/MustacheInjectionTest.php
  59. 1 1
      test/Mustache/Test/Functional/MustacheSpecTest.php
  60. 1 1
      test/Mustache/Test/Functional/NestedPartialIndentTest.php
  61. 1 1
      test/Mustache/Test/Functional/ObjectSectionTest.php
  62. 1 1
      test/Mustache/Test/FunctionalTestCase.php
  63. 1 1
      test/Mustache/Test/HelperCollectionTest.php
  64. 1 1
      test/Mustache/Test/Loader/ArrayLoaderTest.php
  65. 1 1
      test/Mustache/Test/Loader/CascadingLoaderTest.php
  66. 2 2
      test/Mustache/Test/Loader/FilesystemLoaderTest.php
  67. 1 1
      test/Mustache/Test/Loader/StringLoaderTest.php
  68. 1 1
      test/Mustache/Test/Logger/AbstractLoggerTest.php
  69. 1 1
      test/Mustache/Test/Logger/StreamLoggerTest.php
  70. 1 1
      test/Mustache/Test/ParserTest.php
  71. 1 1
      test/Mustache/Test/SpecTestCase.php
  72. 1 1
      test/Mustache/Test/TemplateTest.php
  73. 1 1
      test/Mustache/Test/TokenizerTest.php
  74. 75 1
      test/bootstrap.php
  75. 1 1
      test/fixtures/autoloader/Mustache/Bar.php
  76. 1 1
      test/fixtures/autoloader/Mustache/Foo.php
  77. 1 1
      test/fixtures/autoloader/NonMustacheClass.php
  78. 9 0
      test/fixtures/examples/blocks/Blocks.php
  79. 9 0
      test/fixtures/examples/child_context/ChildContext.php
  80. 9 0
      test/fixtures/examples/comments/Comments.php
  81. 9 0
      test/fixtures/examples/complex/complex.php
  82. 9 0
      test/fixtures/examples/delimiters/Delimiters.php
  83. 9 0
      test/fixtures/examples/dot_notation/DotNotation.php
  84. 9 0
      test/fixtures/examples/double_section/DoubleSection.php
  85. 9 0
      test/fixtures/examples/escaped/Escaped.php
  86. 9 0
      test/fixtures/examples/filters/Filters.php
  87. 9 0
      test/fixtures/examples/grand_parent_context/GrandParentContext.php
  88. 9 0
      test/fixtures/examples/i18n/I18n.php
  89. 9 0
      test/fixtures/examples/implicit_iterator/ImplicitIterator.php
  90. 9 0
      test/fixtures/examples/inverted_double_section/InvertedDoubleSection.php
  91. 9 0
      test/fixtures/examples/inverted_section/InvertedSection.php
  92. 9 0
      test/fixtures/examples/nested_partials/NestedPartials.php
  93. 9 0
      test/fixtures/examples/partials/Partials.php
  94. 9 0
      test/fixtures/examples/recursive_partials/RecursivePartials.php
  95. 9 0
      test/fixtures/examples/section_iterator_objects/SectionIteratorObjects.php
  96. 9 0
      test/fixtures/examples/section_magic_objects/SectionMagicObjects.php
  97. 9 0
      test/fixtures/examples/section_objects/SectionObjects.php
  98. 9 0
      test/fixtures/examples/sections/Sections.php
  99. 9 0
      test/fixtures/examples/sections_nested/SectionsNested.php
  100. 10 1
      test/fixtures/examples/simple/Simple.php

+ 3 - 7
.travis.yml

@@ -1,12 +1,5 @@
 language: php
 
-install:
-  - curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer.phar
-
-script:
-  - phpunit
-  - if [[ `php -r "echo version_compare(PHP_VERSION, '5.3.6', '>=') && !defined('HHVM_VERSION');"` ]]; then php php-cs-fixer.phar --diff --dry-run -vv fix; fi
-
 php:
   - 5.2
   - 5.3
@@ -16,4 +9,7 @@ php:
   - 7.0
   - hhvm
 
+script:
+  - phpunit
+
 sudo: false

+ 1 - 0
README.md

@@ -5,6 +5,7 @@ A [Mustache](http://mustache.github.com/) implementation in PHP.
 
 [![Package version](http://img.shields.io/packagist/v/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
 [![Build status](http://img.shields.io/travis/bobthecow/mustache.php/dev.svg?style=flat-square)](http://travis-ci.org/bobthecow/mustache.php)
+[![StyleCI](https://styleci.io/repos/569670/shield)](https://styleci.io/repos/569670)
 [![Monthly downloads](http://img.shields.io/packagist/dm/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
 
 

+ 1 - 1
bin/build_bootstrap.php

@@ -78,7 +78,7 @@ class SymfonyClassCollectionLoader
 {
     private static $loaded;
 
-    const HEADER = <<<EOS
+    const HEADER = <<<'EOS'
 <?php
 
 /*

+ 1 - 1
composer.json

@@ -17,7 +17,7 @@
     },
     "require-dev": {
         "phpunit/phpunit": "~3.7|~4.0|~5.0",
-        "fabpot/php-cs-fixer": "~1.6"
+        "friendsofphp/php-cs-fixer": "~1.11"
     },
     "autoload": {
         "psr-0": { "Mustache": "src/" }

+ 1 - 1
src/Mustache/Autoloader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Cache.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Cache/AbstractCache.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 3 - 3
src/Mustache/Cache/FilesystemCache.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -27,8 +27,8 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache
     /**
      * Filesystem cache constructor.
      *
-     * @param string $baseDir  Directory for compiled templates.
-     * @param int    $fileMode Override default permissions for cache files. Defaults to using the system-defined umask.
+     * @param string $baseDir  Directory for compiled templates
+     * @param int    $fileMode Override default permissions for cache files. Defaults to using the system-defined umask
      */
     public function __construct($baseDir, $fileMode = null)
     {

+ 1 - 1
src/Mustache/Cache/NoopCache.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 12 - 9
src/Mustache/Compiler.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -75,7 +75,7 @@ class Mustache_Compiler
     /**
      * Helper function for walking the Mustache token parse tree.
      *
-     * @throws Mustache_Exception_SyntaxException upon encountering unknown token types.
+     * @throws Mustache_Exception_SyntaxException upon encountering unknown token types
      *
      * @param array $tree  Parse tree of Mustache tokens
      * @param int   $level (default: 0)
@@ -191,7 +191,7 @@ class Mustache_Compiler
             {
                 $this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
                 $buffer = \'\';
-                $newContext = array();
+                $blocksContext = array();
         %s
 
                 return $buffer;
@@ -207,7 +207,7 @@ class Mustache_Compiler
             public function renderInternal(Mustache_Context $context, $indent = \'\')
             {
                 $buffer = \'\';
-                $newContext = array();
+                $blocksContext = array();
         %s
 
                 return $buffer;
@@ -264,7 +264,7 @@ class Mustache_Compiler
         return sprintf($this->prepare(self::BLOCK_VAR, $level), $id, $this->walk($nodes, $level));
     }
 
-    const BLOCK_ARG = '$newContext[%s] = array($this, \'block%s\');';
+    const BLOCK_ARG = '$blocksContext[%s] = array($this, \'block%s\');';
 
     /**
      * Generate Mustache Template inheritance block argument PHP source.
@@ -291,7 +291,8 @@ class Mustache_Compiler
     const BLOCK_FUNCTION = '
         public function block%s($context)
         {
-            $indent = $buffer = \'\';%s
+            $indent = $buffer = \'\';
+            $blocksContext = array();%s
 
             return $buffer;
         }
@@ -326,6 +327,8 @@ class Mustache_Compiler
         private function section%s(Mustache_Context $context, $indent, $value)
         {
             $buffer = \'\';
+            $blocksContext = array();
+
             if (%s) {
                 $source = %s;
                 $result = call_user_func($value, $source, %s);
@@ -456,8 +459,8 @@ class Mustache_Compiler
     const PARENT = '
         %s
 
-        if ($parent = $this->mustache->LoadPartial(%s)) {
-            $context->pushBlockContext($newContext);
+        if ($parent = $this->mustache->loadPartial(%s)) {
+            $context->pushBlockContext($blocksContext);
             $buffer .= $parent->renderInternal($context, $indent);
             $context->popBlockContext();
         }
@@ -490,7 +493,7 @@ class Mustache_Compiler
      *
      * @param array $node
      *
-     * @return bool True if $node is a block arg token.
+     * @return bool True if $node is a block arg token
      */
     private static function onlyBlockArgs(array $node)
     {

+ 3 - 3
src/Mustache/Context.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -150,7 +150,7 @@ class Mustache_Context
      *
      * @see Mustache_Context::findDot
      *
-     * @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id.
+     * @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id
      *
      * @param string $id Dotted variable selector
      *
@@ -182,7 +182,7 @@ class Mustache_Context
      *
      * @param string $id
      *
-     * @return mixed Variable value, or '' if not found.
+     * @return mixed Variable value, or '' if not found
      */
     public function findInBlock($id)
     {

+ 4 - 4
src/Mustache/Engine.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -23,7 +23,7 @@
  */
 class Mustache_Engine
 {
-    const VERSION        = '2.10.0';
+    const VERSION        = '2.11.0';
     const SPEC_VERSION   = '1.1.2';
 
     const PRAGMA_FILTERS      = 'FILTERS';
@@ -126,7 +126,7 @@ class Mustache_Engine
      *         'pragmas' => [Mustache_Engine::PRAGMA_FILTERS],
      *     );
      *
-     * @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable.
+     * @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable
      *
      * @param array $options (default: array())
      */
@@ -429,7 +429,7 @@ class Mustache_Engine
     /**
      * Set the Mustache Logger instance.
      *
-     * @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface.
+     * @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface
      *
      * @param Mustache_Logger|Psr\Log\LoggerInterface $logger
      */

+ 1 - 1
src/Mustache/Exception.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Exception/InvalidArgumentException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Exception/LogicException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Exception/RuntimeException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 10 - 5
src/Mustache/Exception/SyntaxException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,13 +17,18 @@ class Mustache_Exception_SyntaxException extends LogicException implements Musta
     protected $token;
 
     /**
-     * @param string $msg
-     * @param array  $token
+     * @param string    $msg
+     * @param array     $token
+     * @param Exception $previous
      */
-    public function __construct($msg, array $token)
+    public function __construct($msg, array $token, Exception $previous = null)
     {
         $this->token = $token;
-        parent::__construct($msg);
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            parent::__construct($msg, 0, $previous);
+        } else {
+            parent::__construct($msg);
+        }
     }
 
     /**

+ 10 - 4
src/Mustache/Exception/UnknownFilterException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,12 +17,18 @@ class Mustache_Exception_UnknownFilterException extends UnexpectedValueException
     protected $filterName;
 
     /**
-     * @param string $filterName
+     * @param string    $filterName
+     * @param Exception $previous
      */
-    public function __construct($filterName)
+    public function __construct($filterName, Exception $previous = null)
     {
         $this->filterName = $filterName;
-        parent::__construct(sprintf('Unknown filter: %s', $filterName));
+        $message = sprintf('Unknown filter: %s', $filterName);
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            parent::__construct($message, 0, $previous);
+        } else {
+            parent::__construct($message);
+        }
     }
 
     public function getFilterName()

+ 10 - 4
src/Mustache/Exception/UnknownHelperException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,12 +17,18 @@ class Mustache_Exception_UnknownHelperException extends InvalidArgumentException
     protected $helperName;
 
     /**
-     * @param string $helperName
+     * @param string    $helperName
+     * @param Exception $previous
      */
-    public function __construct($helperName)
+    public function __construct($helperName, Exception $previous = null)
     {
         $this->helperName = $helperName;
-        parent::__construct(sprintf('Unknown helper: %s', $helperName));
+        $message = sprintf('Unknown helper: %s', $helperName);
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            parent::__construct($message, 0, $previous);
+        } else {
+            parent::__construct($message);
+        }
     }
 
     public function getHelperName()

+ 10 - 4
src/Mustache/Exception/UnknownTemplateException.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,12 +17,18 @@ class Mustache_Exception_UnknownTemplateException extends InvalidArgumentExcepti
     protected $templateName;
 
     /**
-     * @param string $templateName
+     * @param string    $templateName
+     * @param Exception $previous
      */
-    public function __construct($templateName)
+    public function __construct($templateName, Exception $previous = null)
     {
         $this->templateName = $templateName;
-        parent::__construct(sprintf('Unknown template: %s', $templateName));
+        $message = sprintf('Unknown template: %s', $templateName);
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+            parent::__construct($message, 0, $previous);
+        } else {
+            parent::__construct($message);
+        }
     }
 
     public function getTemplateName()

+ 3 - 3
src/Mustache/HelperCollection.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -81,7 +81,7 @@ class Mustache_HelperCollection
     /**
      * Get a helper by name.
      *
-     * @throws Mustache_Exception_UnknownHelperException If helper does not exist.
+     * @throws Mustache_Exception_UnknownHelperException If helper does not exist
      *
      * @param string $name
      *
@@ -137,7 +137,7 @@ class Mustache_HelperCollection
     /**
      * Check whether a given helper is present in the collection.
      *
-     * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present.
+     * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present
      *
      * @param string $name
      */

+ 5 - 5
src/Mustache/LambdaHelper.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -25,8 +25,8 @@ class Mustache_LambdaHelper
     /**
      * Mustache Lambda Helper constructor.
      *
-     * @param Mustache_Engine  $mustache Mustache engine instance.
-     * @param Mustache_Context $context  Rendering context.
+     * @param Mustache_Engine  $mustache Mustache engine instance
+     * @param Mustache_Context $context  Rendering context
      * @param string           $delims   Optional custom delimiters, in the format `{{= <% %> =}}`. (default: null)
      */
     public function __construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null)
@@ -41,7 +41,7 @@ class Mustache_LambdaHelper
      *
      * @param string $string
      *
-     * @return string Rendered template.
+     * @return string Rendered template
      */
     public function render($string)
     {
@@ -65,7 +65,7 @@ class Mustache_LambdaHelper
     /**
      * Get a Lambda Helper with custom delimiters.
      *
-     * @param string $delims Custom delimiters, in the format `{{= <% %> =}}`.
+     * @param string $delims Custom delimiters, in the format `{{= <% %> =}}`
      *
      * @return Mustache_LambdaHelper
      */

+ 2 - 2
src/Mustache/Loader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,7 +17,7 @@ interface Mustache_Loader
     /**
      * Load a Template by name.
      *
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
      *
      * @param string $name
      *

+ 2 - 2
src/Mustache/Loader/ArrayLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -41,7 +41,7 @@ class Mustache_Loader_ArrayLoader implements Mustache_Loader, Mustache_Loader_Mu
     /**
      * Load a Template.
      *
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
      *
      * @param string $name
      *

+ 2 - 2
src/Mustache/Loader/CascadingLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -48,7 +48,7 @@ class Mustache_Loader_CascadingLoader implements Mustache_Loader
     /**
      * Load a Template by name.
      *
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
      *
      * @param string $name
      *

+ 17 - 6
src/Mustache/Loader/FilesystemLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -40,9 +40,9 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
      *         'extension' => '.ms',
      *     );
      *
-     * @throws Mustache_Exception_RuntimeException if $baseDir does not exist.
+     * @throws Mustache_Exception_RuntimeException if $baseDir does not exist
      *
-     * @param string $baseDir Base directory containing Mustache template files.
+     * @param string $baseDir Base directory containing Mustache template files
      * @param array  $options Array of Loader options (default: array())
      */
     public function __construct($baseDir, array $options = array())
@@ -53,7 +53,7 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
             $this->baseDir = realpath($this->baseDir);
         }
 
-        if (!is_dir($this->baseDir)) {
+        if ($this->shouldCheckPath() && !is_dir($this->baseDir)) {
             throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
         }
 
@@ -88,7 +88,7 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
     /**
      * Helper function for loading a Mustache file by name.
      *
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
      *
      * @param string $name
      *
@@ -98,7 +98,7 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
     {
         $fileName = $this->getFileName($name);
 
-        if (!file_exists($fileName)) {
+        if ($this->shouldCheckPath() && !file_exists($fileName)) {
             throw new Mustache_Exception_UnknownTemplateException($name);
         }
 
@@ -121,4 +121,15 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
 
         return $fileName;
     }
+
+    /**
+     * Only check if baseDir is a directory and requested templates are files if
+     * baseDir is using the filesystem stream wrapper.
+     *
+     * @return bool Whether to check `is_dir` and `file_exists`
+     */
+    protected function shouldCheckPath()
+    {
+        return strpos($this->baseDir, '://') === false || strpos($this->baseDir, 'file://') === 0;
+    }
 }

+ 3 - 3
src/Mustache/Loader/InlineLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -68,7 +68,7 @@ class Mustache_Loader_InlineLoader implements Mustache_Loader
      * @param string $fileName The file to parse for inline templates
      * @param int    $offset   A string offset for the start of the templates.
      *                         This usually coincides with the `__halt_compiler`
-     *                         call, and the `__COMPILER_HALT_OFFSET__`.
+     *                         call, and the `__COMPILER_HALT_OFFSET__`
      */
     public function __construct($fileName, $offset)
     {
@@ -87,7 +87,7 @@ class Mustache_Loader_InlineLoader implements Mustache_Loader
     /**
      * Load a Template by name.
      *
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
      *
      * @param string $name
      *

+ 1 - 1
src/Mustache/Loader/MutableLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Loader/StringLoader.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Logger.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
src/Mustache/Logger/AbstractLogger.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 7 - 7
src/Mustache/Logger/StreamLogger.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -36,7 +36,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
     protected $url    = null;
 
     /**
-     * @throws InvalidArgumentException if the logging level is unknown.
+     * @throws InvalidArgumentException if the logging level is unknown
      *
      * @param resource|string $stream Resource instance or URL
      * @param int             $level  The minimum logging level at which this handler will be triggered
@@ -65,7 +65,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
     /**
      * Set the minimum logging level.
      *
-     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
+     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
      *
      * @param int $level The minimum logging level which will be written
      */
@@ -91,7 +91,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
     /**
      * Logs with an arbitrary level.
      *
-     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
+     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
      *
      * @param mixed  $level
      * @param string $message
@@ -111,8 +111,8 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
     /**
      * Write a record to the log.
      *
-     * @throws Mustache_Exception_LogicException   If neither a stream resource nor url is present.
-     * @throws Mustache_Exception_RuntimeException If the stream url cannot be opened.
+     * @throws Mustache_Exception_LogicException   If neither a stream resource nor url is present
+     * @throws Mustache_Exception_RuntimeException If the stream url cannot be opened
      *
      * @param int    $level   The logging level
      * @param string $message The log message
@@ -139,7 +139,7 @@ class Mustache_Logger_StreamLogger extends Mustache_Logger_AbstractLogger
     /**
      * Gets the name of the logging level.
      *
-     * @throws InvalidArgumentException if the logging level is unknown.
+     * @throws InvalidArgumentException if the logging level is unknown
      *
      * @param int $level
      *

+ 6 - 6
src/Mustache/Parser.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -63,7 +63,7 @@ class Mustache_Parser
     /**
      * Helper method for recursively building a parse tree.
      *
-     * @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered.
+     * @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered
      *
      * @param array &$tokens Set of Mustache tokens
      * @param array $parent  Parent token (default: null)
@@ -195,10 +195,10 @@ class Mustache_Parser
      *
      * Returns a whitespace token for indenting partials, if applicable.
      *
-     * @param array $nodes  Parsed nodes.
-     * @param array $tokens Tokens to be parsed.
+     * @param array $nodes  Parsed nodes
+     * @param array $tokens Tokens to be parsed
      *
-     * @return array|null Resulting indent token, if any.
+     * @return array|null Resulting indent token, if any
      */
     private function clearStandaloneLines(array &$nodes, array &$tokens)
     {
@@ -268,7 +268,7 @@ class Mustache_Parser
     /**
      * Check whether a token is allowed inside a parent tag.
      *
-     * @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag.
+     * @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag
      *
      * @param array|null $parent
      * @param array      $token

+ 1 - 1
src/Mustache/Template.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 2 - 2
src/Mustache/Tokenizer.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -80,7 +80,7 @@ class Mustache_Tokenizer
     /**
      * Scan and tokenize template source.
      *
-     * @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered.
+     * @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered
      *
      * @param string $text       Mustache template source to tokenize
      * @param string $delimiters Optionally, pass initial opening and closing delimiters (default: null)

+ 1 - 1
test/Mustache/Test/AutoloaderTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Cache/AbstractCacheTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Cache/FilesystemCacheTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/CompilerTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/ContextTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 2 - 2
test/Mustache/Test/EngineTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -317,7 +317,7 @@ class Mustache_Test_EngineTest extends Mustache_Test_FunctionalTestCase
         list($name, $mustache) = $this->getLoggedMustache(Mustache_Logger::DEBUG);
         $mustache->render('{{ foo }}{{> bar }}', array('foo' => 'FOO'));
         $log = file_get_contents($name);
-        $this->assertContains('DEBUG: Instantiating template: ',   $log);
+        $this->assertContains('DEBUG: Instantiating template: ', $log);
         $this->assertContains('WARNING: Partial not found: "bar"', $log);
     }
 

+ 13 - 1
test/Mustache/Test/Exception/SyntaxExceptionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -24,4 +24,16 @@ class Mustache_Test_Exception_SyntaxExceptionTest extends PHPUnit_Framework_Test
         $e = new Mustache_Exception_SyntaxException('ignore this', $token);
         $this->assertEquals($token, $e->getToken());
     }
+
+    public function testPrevious()
+    {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+            $this->markTestSkipped('Exception chaining requires at least PHP 5.3');
+        }
+
+        $previous = new Exception();
+        $e = new Mustache_Exception_SyntaxException('foo', array(), $previous);
+
+        $this->assertSame($previous, $e->getPrevious());
+    }
 }

+ 13 - 1
test/Mustache/Test/Exception/UnknownFilterExceptionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -29,4 +29,16 @@ class Mustache_Test_Exception_UnknownFilterExceptionTest extends PHPUnit_Framewo
         $e = new Mustache_Exception_UnknownFilterException('eggs');
         $this->assertEquals('eggs', $e->getFilterName());
     }
+
+    public function testPrevious()
+    {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+            $this->markTestSkipped('Exception chaining requires at least PHP 5.3');
+        }
+
+        $previous = new Exception();
+        $e = new Mustache_Exception_UnknownFilterException('foo', $previous);
+
+        $this->assertSame($previous, $e->getPrevious());
+    }
 }

+ 12 - 1
test/Mustache/Test/Exception/UnknownHelperExceptionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -29,4 +29,15 @@ class Mustache_Test_Exception_UnknownHelperExceptionTest extends PHPUnit_Framewo
         $e = new Mustache_Exception_UnknownHelperException('gamma');
         $this->assertEquals('gamma', $e->getHelperName());
     }
+
+    public function testPrevious()
+    {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+            $this->markTestSkipped('Exception chaining requires at least PHP 5.3');
+        }
+
+        $previous = new Exception();
+        $e = new Mustache_Exception_UnknownHelperException('foo', $previous);
+        $this->assertSame($previous, $e->getPrevious());
+    }
 }

+ 12 - 1
test/Mustache/Test/Exception/UnknownTemplateExceptionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -29,4 +29,15 @@ class Mustache_Test_Exception_UnknownTemplateExceptionTest extends PHPUnit_Frame
         $e = new Mustache_Exception_UnknownTemplateException('yoshi');
         $this->assertEquals('yoshi', $e->getTemplateName());
     }
+
+    public function testPrevious()
+    {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+            $this->markTestSkipped('Exception chaining requires at least PHP 5.3');
+        }
+
+        $previous = new Exception();
+        $e = new Mustache_Exception_UnknownTemplateException('foo', $previous);
+        $this->assertSame($previous, $e->getPrevious());
+    }
 }

+ 4 - 2
test/Mustache/Test/FiveThree/Functional/ClosureQuirksTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -25,6 +25,8 @@ class Mustache_Test_FiveThree_Functional_ClosureQuirksTest extends PHPUnit_Frame
     public function testClosuresDontLikeItWhenYouTouchTheirProperties()
     {
         $tpl = $this->mustache->loadTemplate('{{ foo.bar }}');
-        $this->assertEquals('', $tpl->render(array('foo' => function () { return 'FOO'; })));
+        $this->assertEquals('', $tpl->render(array('foo' => function () {
+            return 'FOO';
+        })));
     }
 }

+ 1 - 1
test/Mustache/Test/FiveThree/Functional/EngineTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 40 - 16
test/Mustache/Test/FiveThree/Functional/FiltersTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -35,11 +35,11 @@ class Mustache_Test_FiveThree_Functional_FiltersTest extends PHPUnit_Framework_T
     {
         $helpers = array(
             'longdate' => function (\DateTime $value) {
-                    return $value->format('Y-m-d h:m:s');
-                },
+                return $value->format('Y-m-d h:m:s');
+            },
             'echo' => function ($value) {
-                    return array($value, $value, $value);
-                },
+                return array($value, $value, $value);
+            },
         );
 
         return array(
@@ -77,7 +77,7 @@ class Mustache_Test_FiveThree_Functional_FiltersTest extends PHPUnit_Framework_T
         $this->assertEquals('[[2000-01-01 12:01:00]]', $tpl->render($foo));
     }
 
-    const CHAINED_SECTION_FILTERS_TPL = <<<EOS
+    const CHAINED_SECTION_FILTERS_TPL = <<<'EOS'
 {{% FILTERS }}
 {{# word | echo | with_index }}
 {{ key }}: {{ value }}
@@ -143,21 +143,45 @@ EOS;
             array('{{% FILTERS }}{{ foo | bar }}',       array('foo' => 'FOO')),
             array('{{% FILTERS }}{{ foo | bar }}',       array('foo' => 'FOO', 'bar' => 'BAR')),
             array('{{% FILTERS }}{{ foo | bar }}',       array('foo' => 'FOO', 'bar' => array(1, 2))),
-            array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
-            array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
-            array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
-            array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
-            array('{{% FILTERS }}{{ foo | bar.baz }}',   array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
+            array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
+                return 'BAR';
+            })),
+            array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
+                return 'BAZ';
+            })),
+            array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () {
+                return 'BAR';
+            })),
+            array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () {
+                return 'BAZ';
+            })),
+            array('{{% FILTERS }}{{ foo | bar.baz }}',   array('foo' => 'FOO', 'bar' => function () {
+                return 'BAR';
+            }, 'baz' => function () {
+                return 'BAZ';
+            })),
 
             array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}',             array()),
             array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}',             array('foo' => 'FOO')),
             array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}',             array('foo' => 'FOO', 'bar' => 'BAR')),
             array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}',             array('foo' => 'FOO', 'bar' => array(1, 2))),
-            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
-            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
-            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
-            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
-            array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}',     array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
+            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
+                return 'BAR';
+            })),
+            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
+                return 'BAZ';
+            })),
+            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () {
+                return 'BAR';
+            })),
+            array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () {
+                return 'BAZ';
+            })),
+            array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}',     array('foo' => 'FOO', 'bar' => function () {
+                return 'BAR';
+            }, 'baz' => function () {
+                return 'BAZ';
+            })),
         );
     }
 }

+ 1 - 1
test/Mustache/Test/FiveThree/Functional/HigherOrderSectionsTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/FiveThree/Functional/LambdaHelperTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/FiveThree/Functional/MustacheSpecTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 7 - 7
test/Mustache/Test/FiveThree/Functional/PartialLambdaIndentTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -17,18 +17,18 @@ class Mustache_Test_FiveThree_Functional_PartialLambdaIndentTest extends PHPUnit
 {
     public function testLambdasInsidePartialsAreIndentedProperly()
     {
-        $src = <<<EOS
+        $src = <<<'EOS'
 <fieldset>
   {{> input }}
 </fieldset>
 
 EOS;
-        $partial = <<<EOS
+        $partial = <<<'EOS'
 <input placeholder="{{# _t }}Enter your name{{/ _t }}">
 
 EOS;
 
-        $expected = <<<EOS
+        $expected = <<<'EOS'
 <fieldset>
   <input placeholder="ENTER YOUR NAME">
 </fieldset>
@@ -47,18 +47,18 @@ EOS;
 
     public function testLambdaInterpolationsInsidePartialsAreIndentedProperly()
     {
-        $src = <<<EOS
+        $src = <<<'EOS'
 <fieldset>
   {{> input }}
 </fieldset>
 
 EOS;
-        $partial = <<<EOS
+        $partial = <<<'EOS'
 <input placeholder="{{ placeholder }}">
 
 EOS;
 
-        $expected = <<<EOS
+        $expected = <<<'EOS'
 <fieldset>
   <input placeholder="Enter your name">
 </fieldset>

+ 7 - 3
test/Mustache/Test/FiveThree/Functional/StrictCallablesTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -52,7 +52,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
             ),
             array(
                 false,
-                function () { return 'Yoshi'; },
+                function () {
+                    return 'Yoshi';
+                },
                 $lambda,
                 'YOSHI',
             ),
@@ -80,7 +82,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
             // Strict interpolation lambdas
             array(
                 true,
-                function () { return 'Yoshi'; },
+                function () {
+                    return 'Yoshi';
+                },
                 $lambda,
                 'YOSHI',
             ),

+ 2 - 1
test/Mustache/Test/Functional/CallTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -32,6 +32,7 @@ class Mustache_Test_Functional_CallTest extends PHPUnit_Framework_TestCase
 class Mustache_Test_Functional_ClassWithCall
 {
     public $name;
+
     public function __call($method, $args)
     {
         return 'unknown value';

+ 1 - 1
test/Mustache/Test/Functional/ExamplesTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Functional/HigherOrderSectionsTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 18 - 0
test/Mustache/Test/Functional/InheritanceTest.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 /**
  * @group inheritance
  * @group functional
@@ -84,6 +93,15 @@ class Mustache_Test_Functional_InheritanceTest extends PHPUnit_Framework_TestCas
                 '{{<foo}}set by template{{$baz}}also set by template{{/baz}}{{/foo}}',
                 'also set by template',
             ),
+            array(
+                array(
+                    'foo' => '{{$a}}FAIL!{{/a}}',
+                    'bar' => 'WIN!!',
+                ),
+                array(),
+                '{{<foo}}{{$a}}{{<bar}}FAIL{{/bar}}{{/a}}{{/foo}}',
+                'WIN!!',
+            ),
         );
     }
 

+ 1 - 1
test/Mustache/Test/Functional/MustacheInjectionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Functional/MustacheSpecTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Functional/NestedPartialIndentTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Functional/ObjectSectionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/FunctionalTestCase.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/HelperCollectionTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Loader/ArrayLoaderTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Loader/CascadingLoaderTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 2 - 2
test/Mustache/Test/Loader/FilesystemLoaderTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -33,7 +33,7 @@ class Mustache_Test_Loader_FilesystemLoaderTest extends PHPUnit_Framework_TestCa
     {
         $baseDir = realpath(dirname(__FILE__) . '/../../../fixtures/templates');
 
-        $loader = new Mustache_Loader_FilesystemLoader('file://' . $baseDir, array('extension' => '.ms'));
+        $loader = new Mustache_Loader_FilesystemLoader('test://' . $baseDir, array('extension' => '.ms'));
         $this->assertEquals('alpha contents', $loader->load('alpha'));
         $this->assertEquals('beta contents', $loader->load('beta.ms'));
     }

+ 1 - 1
test/Mustache/Test/Loader/StringLoaderTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Logger/AbstractLoggerTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/Logger/StreamLoggerTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/ParserTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/SpecTestCase.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/TemplateTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/Mustache/Test/TokenizerTest.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 75 - 1
test/bootstrap.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -14,3 +14,77 @@ Mustache_Autoloader::register();
 Mustache_Autoloader::register(dirname(__FILE__) . '/../test');
 
 require dirname(__FILE__) . '/../vendor/yaml/lib/sfYamlParser.php';
+
+/**
+ * Minimal stream wrapper to test protocol-based access to templates.
+ */
+class TestStream
+{
+    private $filehandle;
+
+    /**
+     * Always returns false.
+     *
+     * @param string $path
+     * @param int    $flags
+     *
+     * @return array
+     */
+    public function url_stat($path, $flags)
+    {
+        return false;
+    }
+
+    /**
+     * Open the file.
+     *
+     * @param string $path
+     * @param string $mode
+     *
+     * @return bool
+     */
+    public function stream_open($path, $mode)
+    {
+        $path = preg_replace('-^test://-', '', $path);
+        $this->filehandle = fopen($path, $mode);
+
+        return $this->filehandle !== false;
+    }
+
+    /**
+     * @return array
+     */
+    public function stream_stat()
+    {
+        return [];
+    }
+
+    /**
+     * @param int $count
+     *
+     * @return string
+     */
+    public function stream_read($count)
+    {
+        return fgets($this->filehandle, $count);
+    }
+
+    /**
+     * @return bool
+     */
+    public function stream_eof()
+    {
+        return feof($this->filehandle);
+    }
+
+    /**
+     * @return bool
+     */
+    public function stream_close()
+    {
+        return fclose($this->filehandle);
+    }
+}
+
+stream_wrapper_register('test', TestStream::class)
+    || die('Failed to register protocol');

+ 1 - 1
test/fixtures/autoloader/Mustache/Bar.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/fixtures/autoloader/Mustache/Foo.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 1 - 1
test/fixtures/autoloader/NonMustacheClass.php

@@ -3,7 +3,7 @@
 /*
  * This file is part of Mustache.php.
  *
- * (c) 2010-2015 Justin Hileman
+ * (c) 2010-2016 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.

+ 9 - 0
test/fixtures/examples/blocks/Blocks.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Blocks
 {
     public $items = array(1, 2, 3);

+ 9 - 0
test/fixtures/examples/child_context/ChildContext.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class ChildContext
 {
     public $parent = array(

+ 9 - 0
test/fixtures/examples/comments/Comments.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Comments
 {
     public function title()

+ 9 - 0
test/fixtures/examples/complex/complex.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Complex
 {
     public $header = 'Colors';

+ 9 - 0
test/fixtures/examples/delimiters/Delimiters.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Delimiters
 {
     public $start = 'It worked the first time.';

+ 9 - 0
test/fixtures/examples/dot_notation/DotNotation.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class DotNotation
 {
     public $person = array(

+ 9 - 0
test/fixtures/examples/double_section/DoubleSection.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class DoubleSection
 {
     public function t()

+ 9 - 0
test/fixtures/examples/escaped/Escaped.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Escaped
 {
     public $title = '"Bear" > "Shark"';

+ 9 - 0
test/fixtures/examples/filters/Filters.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Filters
 {
     public $states = array(

+ 9 - 0
test/fixtures/examples/grand_parent_context/GrandParentContext.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class GrandParentContext
 {
     public $grand_parent_id = 'grand_parent1';

+ 9 - 0
test/fixtures/examples/i18n/I18n.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class I18n
 {
     // Variable to be interpolated

+ 9 - 0
test/fixtures/examples/implicit_iterator/ImplicitIterator.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class ImplicitIterator
 {
     public $data = array('Donkey Kong', 'Luigi', 'Mario', 'Peach', 'Yoshi');

+ 9 - 0
test/fixtures/examples/inverted_double_section/InvertedDoubleSection.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class InvertedDoubleSection
 {
     public $t = false;

+ 9 - 0
test/fixtures/examples/inverted_section/InvertedSection.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class InvertedSection
 {
     public $repo = array();

+ 9 - 0
test/fixtures/examples/nested_partials/NestedPartials.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class NestedPartials
 {
     public $val = 'FOURTH!';

+ 9 - 0
test/fixtures/examples/partials/Partials.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Partials
 {
     public $page = array(

+ 9 - 0
test/fixtures/examples/recursive_partials/RecursivePartials.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class RecursivePartials
 {
     public $name  = 'George';

+ 9 - 0
test/fixtures/examples/section_iterator_objects/SectionIteratorObjects.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class SectionIteratorObjects
 {
     public $start = 'It worked the first time.';

+ 9 - 0
test/fixtures/examples/section_magic_objects/SectionMagicObjects.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class SectionMagicObjects
 {
     public $start = 'It worked the first time.';

+ 9 - 0
test/fixtures/examples/section_objects/SectionObjects.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class SectionObjects
 {
     public $start = 'It worked the first time.';

+ 9 - 0
test/fixtures/examples/sections/Sections.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Sections
 {
     public $start = 'It worked the first time.';

+ 9 - 0
test/fixtures/examples/sections_nested/SectionsNested.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class SectionsNested
 {
     public $name = 'Little Mac';

+ 10 - 1
test/fixtures/examples/simple/Simple.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of Mustache.php.
+ *
+ * (c) 2010-2016 Justin Hileman
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 class Simple
 {
     public $name = 'Chris';
@@ -11,4 +20,4 @@ class Simple
     }
 
     public $in_ca = true;
-};
+}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików