@@ -35,7 +35,7 @@ final class Uuid
35
35
public static function uuid_create ($ uuid_type = UUID_TYPE_DEFAULT )
36
36
{
37
37
if (!\is_int ($ uuid_type )) {
38
- trigger_error (sprintf ('uuid_create() expects parameter 1 to be int, %s given ' , gettype ($ uuid_type )), E_USER_WARNING );
38
+ trigger_error (sprintf ('uuid_create() expects parameter 1 to be int, %s given ' , \ gettype ($ uuid_type )), E_USER_WARNING );
39
39
40
40
return null ;
41
41
}
@@ -58,13 +58,13 @@ public static function uuid_create($uuid_type = UUID_TYPE_DEFAULT)
58
58
public static function uuid_generate_md5 ($ uuid_ns , $ name )
59
59
{
60
60
if (!\is_string ($ uuid_ns )) {
61
- trigger_error (sprintf ('uuid_generate_md5() expects parameter 1 to be string, %s given ' , gettype ($ uuid_ns )), E_USER_WARNING );
61
+ trigger_error (sprintf ('uuid_generate_md5() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid_ns )), E_USER_WARNING );
62
62
63
63
return null ;
64
64
}
65
65
66
66
if (!\is_string ($ name )) {
67
- trigger_error (sprintf ('uuid_generate_md5() expects parameter 2 to be string, %s given ' , gettype ($ name )), E_USER_WARNING );
67
+ trigger_error (sprintf ('uuid_generate_md5() expects parameter 2 to be string, %s given ' , \ gettype ($ name )), E_USER_WARNING );
68
68
69
69
return null ;
70
70
}
@@ -98,13 +98,13 @@ public static function uuid_generate_md5($uuid_ns, $name)
98
98
public static function uuid_generate_sha1 ($ uuid_ns , $ name )
99
99
{
100
100
if (!\is_string ($ uuid_ns )) {
101
- trigger_error (sprintf ('uuid_generate_sha1() expects parameter 1 to be string, %s given ' , gettype ($ uuid_ns )), E_USER_WARNING );
101
+ trigger_error (sprintf ('uuid_generate_sha1() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid_ns )), E_USER_WARNING );
102
102
103
103
return null ;
104
104
}
105
105
106
106
if (!\is_string ($ name )) {
107
- trigger_error (sprintf ('uuid_generate_sha1() expects parameter 2 to be string, %s given ' , gettype ($ name )), E_USER_WARNING );
107
+ trigger_error (sprintf ('uuid_generate_sha1() expects parameter 2 to be string, %s given ' , \ gettype ($ name )), E_USER_WARNING );
108
108
109
109
return null ;
110
110
}
@@ -140,7 +140,7 @@ public static function uuid_generate_sha1($uuid_ns, $name)
140
140
public static function uuid_is_valid ($ uuid )
141
141
{
142
142
if (!\is_string ($ uuid )) {
143
- trigger_error (sprintf ('uuid_is_valid() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
143
+ trigger_error (sprintf ('uuid_is_valid() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
144
144
145
145
return null ;
146
146
}
@@ -151,13 +151,13 @@ public static function uuid_is_valid($uuid)
151
151
public static function uuid_compare ($ uuid1 , $ uuid2 )
152
152
{
153
153
if (!\is_string ($ uuid1 )) {
154
- trigger_error (sprintf ('uuid_compare() expects parameter 1 to be string, %s given ' , gettype ($ uuid1 )), E_USER_WARNING );
154
+ trigger_error (sprintf ('uuid_compare() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid1 )), E_USER_WARNING );
155
155
156
156
return null ;
157
157
}
158
158
159
159
if (!\is_string ($ uuid2 )) {
160
- trigger_error (sprintf ('uuid_compare() expects parameter 2 to be string, %s given ' , gettype ($ uuid2 )), E_USER_WARNING );
160
+ trigger_error (sprintf ('uuid_compare() expects parameter 2 to be string, %s given ' , \ gettype ($ uuid2 )), E_USER_WARNING );
161
161
162
162
return null ;
163
163
}
@@ -184,7 +184,7 @@ public static function uuid_compare($uuid1, $uuid2)
184
184
public static function uuid_is_null ($ uuid )
185
185
{
186
186
if (!\is_string ($ uuid )) {
187
- trigger_error (sprintf ('uuid_is_null() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
187
+ trigger_error (sprintf ('uuid_is_null() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
188
188
189
189
return null ;
190
190
}
@@ -195,7 +195,7 @@ public static function uuid_is_null($uuid)
195
195
public static function uuid_type ($ uuid )
196
196
{
197
197
if (!\is_string ($ uuid )) {
198
- trigger_error (sprintf ('uuid_type() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
198
+ trigger_error (sprintf ('uuid_type() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
199
199
200
200
return null ;
201
201
}
@@ -214,7 +214,7 @@ public static function uuid_type($uuid)
214
214
public static function uuid_variant ($ uuid )
215
215
{
216
216
if (!\is_string ($ uuid )) {
217
- trigger_error (sprintf ('uuid_variant() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
217
+ trigger_error (sprintf ('uuid_variant() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
218
218
219
219
return null ;
220
220
}
@@ -243,7 +243,7 @@ public static function uuid_variant($uuid)
243
243
public static function uuid_time ($ uuid )
244
244
{
245
245
if (!\is_string ($ uuid )) {
246
- trigger_error (sprintf ('uuid_time() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
246
+ trigger_error (sprintf ('uuid_time() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
247
247
248
248
return null ;
249
249
}
@@ -270,7 +270,7 @@ public static function uuid_time($uuid)
270
270
public static function uuid_mac ($ uuid )
271
271
{
272
272
if (!\is_string ($ uuid )) {
273
- trigger_error (sprintf ('uuid_mac() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
273
+ trigger_error (sprintf ('uuid_mac() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
274
274
275
275
return null ;
276
276
}
@@ -289,7 +289,7 @@ public static function uuid_mac($uuid)
289
289
public static function uuid_parse ($ uuid )
290
290
{
291
291
if (!\is_string ($ uuid )) {
292
- trigger_error (sprintf ('uuid_parse() expects parameter 1 to be string, %s given ' , gettype ($ uuid )), E_USER_WARNING );
292
+ trigger_error (sprintf ('uuid_parse() expects parameter 1 to be string, %s given ' , \ gettype ($ uuid )), E_USER_WARNING );
293
293
294
294
return null ;
295
295
}
@@ -306,7 +306,7 @@ public static function uuid_parse($uuid)
306
306
public static function uuid_unparse ($ uuidAsBinary )
307
307
{
308
308
if (!\is_string ($ uuidAsBinary )) {
309
- trigger_error (sprintf ('uuid_unparse() expects parameter 1 to be string, %s given ' , gettype ($ uuidAsBinary )), E_USER_WARNING );
309
+ trigger_error (sprintf ('uuid_unparse() expects parameter 1 to be string, %s given ' , \ gettype ($ uuidAsBinary )), E_USER_WARNING );
310
310
311
311
return null ;
312
312
}
@@ -427,12 +427,12 @@ private static function uuid_parse_as_array($uuid)
427
427
return null ;
428
428
}
429
429
430
- return [
430
+ return array (
431
431
'time_low ' => hexdec ($ matches ['time_low ' ]),
432
432
'time_mid ' => hexdec ($ matches ['time_mid ' ]),
433
433
'time_hi_and_version ' => hexdec ($ matches ['time_hi_and_version ' ]),
434
434
'clock_seq ' => hexdec ($ matches ['clock_seq ' ]),
435
435
'node ' => hexdec ($ matches ['node ' ]),
436
- ] ;
436
+ ) ;
437
437
}
438
438
}
0 commit comments