*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
*/
public function randomString ($length = -1) {
// Is the number <1, then fix it to default length
- if ($length < 1) $length = $this->rndStrLen;
+ if ($length < 1) {
+ $length = $this->rndStrLen;
+ } // END - if
// Initialize the string
$randomString = '';
for ($idx = 0; $idx < $length; $idx++) {
// Add a random character and add it to our string
$randomString .= chr($this->randomNumber(0, 255));
- }
+ } // END - for
// Return the random string a little mixed up
return str_shuffle($randomString);