Bladeren bron

Code style cleanup.

Justin Hileman 13 jaren geleden
bovenliggende
commit
4dd4db6065
4 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 4 0
      src/Mustache/Compiler.php
  2. 3 3
      src/Mustache/Parser.php
  3. 2 2
      src/Mustache/Template.php
  4. 2 1
      src/Mustache/Tokenizer.php

+ 4 - 0
src/Mustache/Compiler.php

@@ -29,6 +29,8 @@ class Mustache_Compiler
      * @param string $source Mustache Template source code
      * @param string $tree   Parse tree of Mustache tokens
      * @param string $name   Mustache Template class name
+     * @param bool   $customEscape (default: false)
+     * @param string $charset (default: 'UTF-8')
      *
      * @return string Generated PHP source code
      */
@@ -328,6 +330,8 @@ class Mustache_Compiler
     /**
      * Get the current escaper.
      *
+     * @param string $value (default: '$value')
+     *
      * @return string Either a custom callback, or an inline call to `htmlspecialchars`
      */
     private function getEscape($value = '$value')

+ 3 - 3
src/Mustache/Parser.php

@@ -32,12 +32,12 @@ class Mustache_Parser
     /**
      * Helper method for recursively building a parse tree.
      *
-     * @throws LogicException when nesting errors or mismatched section tags are encountered.
-     *
      * @param ArrayIterator $tokens Stream of Mustache tokens
-     * @param array          $parent Parent token (default: null)
+     * @param array         $parent Parent token (default: null)
      *
      * @return array Mustache Token parse tree
+     *
+     * @throws LogicException when nesting errors or mismatched section tags are encountered.
      */
     private function buildTree(ArrayIterator $tokens, array $parent = null)
     {

+ 2 - 2
src/Mustache/Template.php

@@ -67,9 +67,9 @@ abstract class Mustache_Template
      *
      * This is where the magic happens :)
      *
-     * @abstract
-     *
      * @param Mustache_Context $context
+     * @param string           $indent (default: '')
+     * @param bool             $escape (default: false)
      *
      * @return string Rendered template
      */

+ 2 - 1
src/Mustache/Tokenizer.php

@@ -14,7 +14,8 @@
  *
  * This class is responsible for turning raw template source into a set of Mustache tokens.
  */
-class Mustache_Tokenizer {
+class Mustache_Tokenizer
+{
 
     // Finite state machine states
     const IN_TEXT     = 0;