Completed
Pull Request — master (#59)
by Bram
08:39
created
classes/PHPTAL/Php/Attribute/TAL/Attributes.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -91,6 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     /**
93 93
      * attribute will be output regardless of its evaluated value. NULL behaves just like "".
94
+     * @param string $code
94 95
      */
95 96
     private function prepareAttributeUnconditional(PHPTAL_Php_CodeWriter $codewriter, $qname, $code)
96 97
     {
@@ -107,6 +108,7 @@  discard block
 block discarded – undo
107 108
 
108 109
     /**
109 110
      * If evaluated value of attribute is NULL, it will not be output at all.
111
+     * @param string $code
110 112
      */
111 113
     private function prepareAttributeConditional(PHPTAL_Php_CodeWriter $codewriter, $qname, $code)
112 114
     {
@@ -139,6 +141,9 @@  discard block
 block discarded – undo
139 141
         $this->phpelement->getOrCreateAttributeNode($qname)->overwriteFullWithVariable($this->_attkey);
140 142
     }
141 143
 
144
+    /**
145
+     * @param string $code
146
+     */
142 147
     private function prepareBooleanAttribute(PHPTAL_Php_CodeWriter $codewriter, $qname, $code)
143 148
     {
144 149
         $attkey = $this->getVarName($qname, $codewriter);
Please login to merge, or discard this patch.
classes/PHPTAL/Php/Attribute/TAL/Condition.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -61,6 +61,10 @@
 block discarded – undo
61 61
     }
62 62
 
63 63
 
64
+    /**
65
+     * @param string $exp
66
+     * @param boolean $islast
67
+     */
64 68
     public function talesChainPart(PHPTAL_Php_TalesChainExecutor $executor, $exp, $islast)
65 69
     {
66 70
         // check if the expression is empty
Please login to merge, or discard this patch.
classes/PHPTAL/Php/State.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * Syntax rules to follow in generated code
100 100
      *
101
-     * @return one of PHPTAL::XHTML, PHPTAL::XML, PHPTAL::HTML5
101
+     * @return integer of PHPTAL::XHTML, PHPTAL::XML, PHPTAL::HTML5
102 102
      */
103 103
     public function getOutputMode()
104 104
     {
@@ -183,6 +183,9 @@  discard block
 block discarded – undo
183 183
         return $this->_interpolateTalesVarsCallback($matches, 'cdata');
184 184
     }
185 185
 
186
+    /**
187
+     * @param string $format
188
+     */
186 189
     private function _interpolateTalesVarsCallback($matches, $format)
187 190
     {
188 191
         // replaces $${ with literal ${ (or $$$${ with $${ etc)
@@ -225,7 +228,7 @@  discard block
 block discarded – undo
225 228
      * expects PHP code and returns PHP code that will generate escaped string
226 229
      * Optimizes case when PHP string is given.
227 230
      *
228
-     * @return php code
231
+     * @return string code
229 232
      */
230 233
     public function htmlchars($php)
231 234
     {
Please login to merge, or discard this patch.
classes/PHPTAL/Php/TalesInternal.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -228,6 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
     /**
230 230
      * @param string $tales_prefix prefix added to all TALES in the string
231
+     * @param boolean $nothrow
231 232
      */
232 233
     static public function parseString($expression, $nothrow, $tales_prefix)
233 234
     {
@@ -435,6 +436,10 @@  discard block
 block discarded – undo
435 436
      * helper function for compileToPHPExpression
436 437
      * @access private
437 438
      */
439
+
440
+    /**
441
+     * @param boolean $nothrow
442
+     */
438 443
     private static function convertExpressionsToExpression(array $array, $nothrow)
439 444
     {
440 445
         if (count($array)==1) return '($ctx->noThrow('.($nothrow?'true':'false').')||1?('.
Please login to merge, or discard this patch.
classes/PHPTAL/PreFilter/Compress.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -139,6 +139,9 @@
 block discarded – undo
139 139
         'html','head','table','thead','tfoot','select','optgroup','dl','ol','ul','tr','datalist',
140 140
     );
141 141
 
142
+    /**
143
+     * @return PHPTAL_Dom_Element
144
+     */
142 145
     private function hasNoInterelementSpace(PHPTAL_Dom_Element $element)
143 146
     {
144 147
         if ($element->getLocalName() === 'block'
Please login to merge, or discard this patch.
classes/PHPTAL/PreFilter/Normalize.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -86,6 +86,7 @@
 block discarded – undo
86 86
 
87 87
     /**
88 88
      * does not trim
89
+     * @return string
89 90
      */
90 91
     protected function normalizeSpace($text, $encoding)
91 92
     {
Please login to merge, or discard this patch.
classes/PHPTAL/StringSource.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -21,6 +21,10 @@
 block discarded – undo
21 21
 {
22 22
     const NO_PATH_PREFIX = '<string ';
23 23
 
24
+    /**
25
+     * @param string $data
26
+     * @param string $realpath
27
+     */
24 28
     public function __construct($data, $realpath = null)
25 29
     {
26 30
         $this->_data = $data;
Please login to merge, or discard this patch.
classes/PHPTAL/TalesRegistry.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
      * callback.
76 76
      *
77 77
      * @param string $prefix
78
-     * @param mixed $callback
78
+     * @param string[] $callback
79 79
      * @param bool $is_fallback if true, method will be used as last resort (if there's no phptal_tales_foo)
80 80
      */
81 81
     public function registerPrefix($prefix, $callback, $is_fallback = false)
Please login to merge, or discard this patch.
tools/phptal_lint.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -127,6 +127,10 @@  discard block
 block discarded – undo
127 127
         echo "  Use 'phptal_lint.php .' to scan current directory\n\n";
128 128
     }
129 129
 
130
+    /**
131
+     * @param integer $num
132
+     * @param string $word
133
+     */
130 134
     function plural($num, $word)
131 135
     {
132 136
         if ($num == 1) return "$num $word";
@@ -196,6 +200,9 @@  discard block
 block discarded – undo
196 200
     public $skipped = 0, $skipped_filenames = array();
197 201
     public $checked = 0;
198 202
 
203
+    /**
204
+     * @param boolean $bool
205
+     */
199 206
     function skipUnknownModifiers($bool)
200 207
     {
201 208
         $this->skipUnknownModifiers = $bool;
@@ -205,11 +212,17 @@  discard block
 block discarded – undo
205 212
         $this->accept_pattern = '/\.(?:' . implode('|', $ext) . ')$/i';
206 213
     }
207 214
 
215
+    /**
216
+     * @param string $symbol
217
+     */
208 218
     protected function reportProgress($symbol)
209 219
     {
210 220
         echo $symbol;
211 221
     }
212 222
 
223
+    /**
224
+     * @param string $path
225
+     */
213 226
     function scan($path)
214 227
     {
215 228
         foreach (new DirectoryIterator($path) as $entry) {
Please login to merge, or discard this patch.