/** @var Array */
protected $fileHandles = array(); // cache file handles
- const QUICK_RAND = 1; // get randomness from fast and unsecure sources
+ const QUICK_RAND = 1; // get randomness from fast and insecure sources
protected function __construct() {
$idFile = wfTempDir() . '/mw-' . __CLASS__ . '-UID-nodeid';
} elseif ( is_executable( '/sbin/ifconfig' ) ) { // Linux/BSD/Solaris/OS X
// See http://linux.die.net/man/8/ifconfig
$m = array();
- preg_match( '/\s([0-9a-f]{2}(:[0-9a-f]{2}){5})\s/', wfShellExec( '/sbin/ifconfig -a' ), $m );
+ preg_match( '/\s([0-9a-f]{2}(:[0-9a-f]{2}){5})\s/',
+ wfShellExec( '/sbin/ifconfig -a' ), $m );
$nodeId = isset( $m[1] ) ? str_replace( ':', '', $m[1] ) : '';
}
wfRestoreWarnings();
}
/**
- * @param $time array (UIDGenerator::millitime(), clock sequence)
+ * @param array $time (UIDGenerator::millitime(), clock sequence)
* @return string 88 bits
*/
protected function getTimestampedID88( array $info ) {
}
/**
- * @param $info array (UIDGenerator::milltime(), counter, clock sequence)
+ * @param array $info (UIDGenerator::millitime(), counter, clock sequence)
* @return string 128 bits
*/
protected function getTimestampedID128( array $info ) {
* than any previous (time,counter) value for the given clock sequence.
* This is useful for making UIDs sequential on a per-node bases.
*
- * @param $lockFile string Name of a local lock file
+ * @param string $lockFile Name of a local lock file
* @param $clockSeqSize integer The number of possible clock sequence values
* @param $counterSize integer The number of possible counter values
* @return Array (result of UIDGenerator::millitime(), counter, clock sequence)
* Wait till the current timestamp reaches $time and return the current
* timestamp. This returns false if it would have to wait more than 10ms.
*
- * @param $time array Result of UIDGenerator::millitime()
+ * @param array $time Result of UIDGenerator::millitime()
* @return Array|bool UIDGenerator::millitime() result or false
*/
protected function timeWaitUntil( array $time ) {
}
/**
- * @param $time array Result of UIDGenerator::millitime()
+ * @param array $time Result of UIDGenerator::millitime()
* @return string 46 MSBs of "milliseconds since epoch" in binary (rolls over in 4201)
*/
protected function millisecondsSinceEpochBinary( array $time ) {