MCPcopy Create free account
hub / github.com/apache/avro / generateSyncMarker

Method generateSyncMarker

lang/php/lib/DataFile/AvroDataIOWriter.php:120–134  ·  view source on GitHub ↗

* @returns string a new, unique sync marker. */

()

Source from the content-addressed store, hash-verified

118 * @returns string a new, unique sync marker.
119 */
120 private static function generateSyncMarker()
121 {
122 // From https://php.net/manual/en/function.mt-rand.php comments
123 return pack(
124 'S8',
125 random_int(0, 0xffff),
126 random_int(0, 0xffff),
127 random_int(0, 0xffff),
128 random_int(0, 0xffff) | 0x4000,
129 random_int(0, 0xffff) | 0x8000,
130 random_int(0, 0xffff),
131 random_int(0, 0xffff),
132 random_int(0, 0xffff)
133 );
134 }
135
136 /**
137 * Writes the header of the AvroIO object container

Callers 1

__constructMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected