@@ -86,6 +86,7 @@ discard block |
||
86 | 86 | * a CultureInfo or NumberFormatInfo instance will instantiated a instance |
87 | 87 | * for that particular culture. |
88 | 88 | * @param mixed either null, a CultureInfo, a NumberFormatInfo, or string |
89 | + * @param string $formatInfo |
|
89 | 90 | * @return NumberFormat |
90 | 91 | */ |
91 | 92 | function __construct($formatInfo=null) |
@@ -111,6 +112,7 @@ discard block |
||
111 | 112 | * 3 decimal places. |
112 | 113 | * @param string 3-letter ISO 4217 code. For example, the code |
113 | 114 | * "USD" represents the US Dollar and "EUR" represents the Euro currency. |
115 | + * @param string $number |
|
114 | 116 | * @return string formatted number string |
115 | 117 | */ |
116 | 118 | function format($number, $pattern='d', $currency='USD', $charset='UTF-8') |
@@ -232,7 +234,7 @@ discard block |
||
232 | 234 | |
233 | 235 | /** |
234 | 236 | * Format the decimal places. |
235 | - * @param string the decimal number in string form. |
|
237 | + * @param string string decimal number in string form. |
|
236 | 238 | * @return string formatted decimal places. |
237 | 239 | */ |
238 | 240 | protected function formatDecimal($string) |
@@ -280,6 +282,7 @@ discard block |
||
280 | 282 | * Set the pattern to format against. The default patterns |
281 | 283 | * are retrieved from the NumberFormatInfo instance. |
282 | 284 | * @param string the requested patterns. |
285 | + * @param string $pattern |
|
283 | 286 | * @return string a number format pattern. |
284 | 287 | */ |
285 | 288 | protected function setPattern($pattern) |
@@ -90,7 +90,7 @@ |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @return string default culture |
|
93 | + * @return boolean default culture |
|
94 | 94 | */ |
95 | 95 | public function getTranslateDefaultCulture() |
96 | 96 | { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | - * @return mixed the algorithm used to encrypt/decrypt data. Defaults to the string 'rijndael-256'. |
|
185 | + * @return string the algorithm used to encrypt/decrypt data. Defaults to the string 'rijndael-256'. |
|
186 | 186 | */ |
187 | 187 | public function getCryptAlgorithm() |
188 | 188 | { |
@@ -201,6 +201,7 @@ discard block |
||
201 | 201 | /** |
202 | 202 | * Encrypts data with {@link getEncryptionKey EncryptionKey}. |
203 | 203 | * @param string data to be encrypted. |
204 | + * @param string $data |
|
204 | 205 | * @return string the encrypted data |
205 | 206 | * @throws TNotSupportedException if PHP Mcrypt extension is not loaded |
206 | 207 | */ |
@@ -220,6 +221,7 @@ discard block |
||
220 | 221 | /** |
221 | 222 | * Decrypts data with {@link getEncryptionKey EncryptionKey}. |
222 | 223 | * @param string data to be decrypted. |
224 | + * @param string $data |
|
223 | 225 | * @return string the decrypted data |
224 | 226 | * @throws TNotSupportedException if PHP Mcrypt extension is not loaded |
225 | 227 | */ |
@@ -73,6 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @param string username |
76 | + * @param string $value |
|
76 | 77 | */ |
77 | 78 | public function setName($value) |
78 | 79 | { |
@@ -89,6 +90,7 @@ discard block |
||
89 | 90 | |
90 | 91 | /** |
91 | 92 | * @param boolean if the user is a guest |
93 | + * @param boolean $value |
|
92 | 94 | */ |
93 | 95 | public function setIsGuest($value) |
94 | 96 | { |
@@ -170,6 +172,7 @@ discard block |
||
170 | 172 | * |
171 | 173 | * @param string variable name |
172 | 174 | * @param mixed default value |
175 | + * @param string $key |
|
173 | 176 | * @return mixed the value of the variable. If it doesn't exist, the provided default value will be returned |
174 | 177 | * @see setState |
175 | 178 | */ |
@@ -190,6 +193,7 @@ discard block |
||
190 | 193 | * @param string variable name |
191 | 194 | * @param mixed variable value |
192 | 195 | * @param mixed default value. If $value===$defaultValue, the variable will be removed from persistent storage. |
196 | + * @param string $key |
|
193 | 197 | * @see getState |
194 | 198 | */ |
195 | 199 | protected function setState($key,$value,$defaultValue=null) |
@@ -215,6 +215,7 @@ discard block |
||
215 | 215 | * This method does not perform any publishing. It merely tells you |
216 | 216 | * if the file path is published, what the URL will be to access it. |
217 | 217 | * @param string directory or file path being published |
218 | + * @param string $path |
|
218 | 219 | * @return string the published URL for the file path |
219 | 220 | */ |
220 | 221 | public function getPublishedUrl($path) |
@@ -230,6 +231,7 @@ discard block |
||
230 | 231 | * Generate a CRC32 hash for the directory path. Collisions are higher |
231 | 232 | * than MD5 but generates a much smaller hash string. |
232 | 233 | * @param string string to be hashed. |
234 | + * @param string $dir |
|
233 | 235 | * @return string hashed string. |
234 | 236 | */ |
235 | 237 | protected function hash($dir) |
@@ -243,6 +245,8 @@ discard block |
||
243 | 245 | * or has an older file modification time. |
244 | 246 | * @param string source file path |
245 | 247 | * @param string destination directory (if not exists, it will be created) |
248 | + * @param string $src |
|
249 | + * @param string $dst |
|
246 | 250 | */ |
247 | 251 | protected function copyFile($src,$dst) |
248 | 252 | { |
@@ -265,6 +269,8 @@ discard block |
||
265 | 269 | * File modification time is used to ensure the copied files are latest. |
266 | 270 | * @param string the source directory |
267 | 271 | * @param string the destination directory |
272 | + * @param string $src |
|
273 | + * @param string $dst |
|
268 | 274 | * @todo a generic solution to ignore certain directories and files |
269 | 275 | */ |
270 | 276 | public function copyDirectory($src,$dst) |
@@ -306,6 +312,8 @@ discard block |
||
306 | 312 | * @param string tar filename |
307 | 313 | * @param string MD5 checksum for the corresponding tar file. |
308 | 314 | * @param boolean Wether or not to check the time stamp of the file for publishing. Defaults to false. |
315 | + * @param string $tarfile |
|
316 | + * @param string $md5sum |
|
309 | 317 | * @return string URL path to the directory where the tar file was extracted. |
310 | 318 | */ |
311 | 319 | public function publishTarFile($tarfile, $md5sum, $checkTimestamp=false) |
@@ -336,6 +344,7 @@ discard block |
||
336 | 344 | * N.B Tar file must not be compressed. |
337 | 345 | * @param string tar file |
338 | 346 | * @param string path where the contents of tar file are to be extracted |
347 | + * @param string $destination |
|
339 | 348 | * @return boolean true if extract successful, false otherwise. |
340 | 349 | */ |
341 | 350 | protected function deployTarFile($path,$destination) |
@@ -145,6 +145,10 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public abstract function performAction($args); |
147 | 147 | |
148 | + /** |
|
149 | + * @param string $dir |
|
150 | + * @param integer $mask |
|
151 | + */ |
|
148 | 152 | protected function createDirectory($dir, $mask) |
149 | 153 | { |
150 | 154 | if(!is_dir($dir)) |
@@ -156,6 +160,9 @@ discard block |
||
156 | 160 | chmod($dir, $mask); |
157 | 161 | } |
158 | 162 | |
163 | + /** |
|
164 | + * @param string $filename |
|
165 | + */ |
|
159 | 166 | protected function createFile($filename, $content) |
160 | 167 | { |
161 | 168 | if(!is_file($filename)) |
@@ -304,6 +311,9 @@ discard block |
||
304 | 311 | '; |
305 | 312 | } |
306 | 313 | |
314 | + /** |
|
315 | + * @param string $appName |
|
316 | + */ |
|
307 | 317 | protected function renderConfigFile($appName) |
308 | 318 | { |
309 | 319 | return <<<EOD |
@@ -500,6 +510,9 @@ discard block |
||
500 | 510 | require_once($TEST_TOOLS.'/simpletest/reporter.php'); |
501 | 511 | } |
502 | 512 | |
513 | + /** |
|
514 | + * @param string $dir |
|
515 | + */ |
|
503 | 516 | protected function runUnitTests($dir, $args) |
504 | 517 | { |
505 | 518 | $app_dir = $this->getAppDir($dir); |
@@ -538,6 +551,9 @@ discard block |
||
538 | 551 | return realpath($dir.'/tests/unit/'); |
539 | 552 | } |
540 | 553 | |
554 | + /** |
|
555 | + * @param string $dir |
|
556 | + */ |
|
541 | 557 | protected function getUnitTestCases($dir,$args) |
542 | 558 | { |
543 | 559 | $matches = null; |
@@ -565,6 +581,9 @@ discard block |
||
565 | 581 | closedir($dir); |
566 | 582 | } |
567 | 583 | |
584 | + /** |
|
585 | + * @param string $entry |
|
586 | + */ |
|
568 | 587 | protected function hasMatch($match,$entry) |
569 | 588 | { |
570 | 589 | $file = strtolower(substr($entry,0,strrpos($entry,'.'))); |
@@ -630,6 +649,9 @@ discard block |
||
630 | 649 | return false; |
631 | 650 | } |
632 | 651 | |
652 | + /** |
|
653 | + * @param string $app_dir |
|
654 | + */ |
|
633 | 655 | protected function getActiveRecordConfig($app_dir) |
634 | 656 | { |
635 | 657 | if(false === ($xml=$this->getXmlFile($app_dir))) |
@@ -645,6 +667,9 @@ discard block |
||
645 | 667 | return false; |
646 | 668 | } |
647 | 669 | |
670 | + /** |
|
671 | + * @param string $app_dir |
|
672 | + */ |
|
648 | 673 | protected function getOutputFile($app_dir, $namespace) |
649 | 674 | { |
650 | 675 | if(is_file($namespace) && strpos($namespace, $app_dir)===0) |
@@ -706,6 +731,9 @@ discard block |
||
706 | 731 | return $prop; |
707 | 732 | } |
708 | 733 | |
734 | + /** |
|
735 | + * @param string $class |
|
736 | + */ |
|
709 | 737 | protected function generateClass($properties, $tablename, $class) |
710 | 738 | { |
711 | 739 | $props = implode("\n", $properties); |
@@ -799,6 +827,9 @@ discard block |
||
799 | 827 | return false; |
800 | 828 | } |
801 | 829 | |
830 | + /** |
|
831 | + * @param string $app_dir |
|
832 | + */ |
|
802 | 833 | protected function getActiveRecordConfig($app_dir) { |
803 | 834 | if (false === ($xml = $this->getXmlFile($app_dir))) |
804 | 835 | return false; |
@@ -842,6 +873,9 @@ discard block |
||
842 | 873 | } |
843 | 874 | } |
844 | 875 | |
876 | + /** |
|
877 | + * @param string $l |
|
878 | + */ |
|
845 | 879 | public function generate($l) |
846 | 880 | { |
847 | 881 | $input = explode(" ", trim($l)); |
@@ -149,6 +149,7 @@ |
||
149 | 149 | /** |
150 | 150 | * Finds the database connection instance from the Application modules. |
151 | 151 | * @param string Database connection module ID. |
152 | + * @param string $id |
|
152 | 153 | * @return TDbConnection database connection. |
153 | 154 | * @throws TConfigurationException when module is not of TDbConnection or TDataSourceConfig. |
154 | 155 | */ |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | /** |
111 | 111 | * @param string a key identifying a value to be cached |
112 | - * @return sring a key generated from the provided key which ensures the uniqueness across applications |
|
112 | + * @return string a key generated from the provided key which ensures the uniqueness across applications |
|
113 | 113 | */ |
114 | 114 | protected function generateUniqueKey($key) |
115 | 115 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param mixed the value to be cached |
144 | 144 | * @param integer the number of seconds in which the cached value will expire. 0 means never expire. |
145 | 145 | * @param ICacheDependency dependency of the cached item. If the dependency changes, the item is labeled invalid. |
146 | - * @return boolean true if the value is successfully stored into cache, false otherwise |
|
146 | + * @return null|boolean true if the value is successfully stored into cache, false otherwise |
|
147 | 147 | */ |
148 | 148 | public function set($id,$value,$expire=0,$dependency=null) |
149 | 149 | { |
@@ -201,6 +201,7 @@ discard block |
||
201 | 201 | * in {@link get()} already. So only the implementation of data retrieval |
202 | 202 | * is needed. |
203 | 203 | * @param string a unique key identifying the cached value |
204 | + * @param string $key |
|
204 | 205 | * @return string the value stored in cache, false if the value is not in the cache or expired. |
205 | 206 | */ |
206 | 207 | abstract protected function getValue($key); |
@@ -215,6 +216,8 @@ discard block |
||
215 | 216 | * @param string the key identifying the value to be cached |
216 | 217 | * @param string the value to be cached |
217 | 218 | * @param integer the number of seconds in which the cached value will expire. 0 means never expire. |
219 | + * @param string $key |
|
220 | + * @param integer $expire |
|
218 | 221 | * @return boolean true if the value is successfully stored into cache, false otherwise |
219 | 222 | */ |
220 | 223 | abstract protected function setValue($key,$value,$expire); |
@@ -229,6 +232,8 @@ discard block |
||
229 | 232 | * @param string the key identifying the value to be cached |
230 | 233 | * @param string the value to be cached |
231 | 234 | * @param integer the number of seconds in which the cached value will expire. 0 means never expire. |
235 | + * @param string $key |
|
236 | + * @param integer $expire |
|
232 | 237 | * @return boolean true if the value is successfully stored into cache, false otherwise |
233 | 238 | */ |
234 | 239 | abstract protected function addValue($key,$value,$expire); |
@@ -237,6 +242,7 @@ discard block |
||
237 | 242 | * Deletes a value with the specified key from cache |
238 | 243 | * This method should be implemented by child classes to delete the data from actual cache storage. |
239 | 244 | * @param string the key of the value to be deleted |
245 | + * @param string $key |
|
240 | 246 | * @return boolean if no error happens during deletion |
241 | 247 | */ |
242 | 248 | abstract protected function deleteValue($key); |
@@ -280,7 +286,7 @@ discard block |
||
280 | 286 | * Deletes the value with the specified key from cache |
281 | 287 | * This method is required by the interface \ArrayAccess. |
282 | 288 | * @param string the key of the value to be deleted |
283 | - * @return boolean if no error happens during deletion |
|
289 | + * @return boolean|null if no error happens during deletion |
|
284 | 290 | */ |
285 | 291 | public function offsetUnset($id) |
286 | 292 | { |
@@ -123,6 +123,7 @@ discard block |
||
123 | 123 | * By default, it always returns true, meaning the file should be checked. |
124 | 124 | * You may override this method to check only certain files. |
125 | 125 | * @param string the name of the file that may be checked for dependency. |
126 | + * @param string $fileName |
|
126 | 127 | * @return boolean whether this file should be checked. |
127 | 128 | */ |
128 | 129 | protected function validateFile($fileName) |
@@ -136,6 +137,7 @@ discard block |
||
136 | 137 | * By default, it always returns true, meaning the subdirectory should be checked. |
137 | 138 | * You may override this method to check only certain subdirectories. |
138 | 139 | * @param string the name of the subdirectory that may be checked for dependency. |
140 | + * @param string $directory |
|
139 | 141 | * @return boolean whether this subdirectory should be checked. |
140 | 142 | */ |
141 | 143 | protected function validateDirectory($directory) |
@@ -149,6 +151,7 @@ discard block |
||
149 | 151 | * {@link setRecursiveCheck RecursiveCheck} is set true. |
150 | 152 | * @param string the directory name |
151 | 153 | * @param int level of the recursion |
154 | + * @param string $directory |
|
152 | 155 | * @return array list of file modification time indexed by the file path |
153 | 156 | */ |
154 | 157 | protected function generateTimestamps($directory,$level=0) |