Skip to content

Commit

Permalink
[UUID] Fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Mar 3, 2020
1 parent 6331393 commit 664a442
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ final class Uuid
public static function uuid_create($uuid_type = UUID_TYPE_DEFAULT)
{
if (!\is_int($uuid_type)) {
trigger_error(sprintf('uuid_create() expects parameter 1 to be int, %s given', gettype($uuid_type)), E_USER_WARNING);
trigger_error(sprintf('uuid_create() expects parameter 1 to be int, %s given', \gettype($uuid_type)), E_USER_WARNING);

return null;
}
Expand All @@ -58,13 +58,13 @@ public static function uuid_create($uuid_type = UUID_TYPE_DEFAULT)
public static function uuid_generate_md5($uuid_ns, $name)
{
if (!\is_string($uuid_ns)) {
trigger_error(sprintf('uuid_generate_md5() expects parameter 1 to be string, %s given', gettype($uuid_ns)), E_USER_WARNING);
trigger_error(sprintf('uuid_generate_md5() expects parameter 1 to be string, %s given', \gettype($uuid_ns)), E_USER_WARNING);

return null;
}

if (!\is_string($name)) {
trigger_error(sprintf('uuid_generate_md5() expects parameter 2 to be string, %s given', gettype($name)), E_USER_WARNING);
trigger_error(sprintf('uuid_generate_md5() expects parameter 2 to be string, %s given', \gettype($name)), E_USER_WARNING);

return null;
}
Expand Down Expand Up @@ -98,13 +98,13 @@ public static function uuid_generate_md5($uuid_ns, $name)
public static function uuid_generate_sha1($uuid_ns, $name)
{
if (!\is_string($uuid_ns)) {
trigger_error(sprintf('uuid_generate_sha1() expects parameter 1 to be string, %s given', gettype($uuid_ns)), E_USER_WARNING);
trigger_error(sprintf('uuid_generate_sha1() expects parameter 1 to be string, %s given', \gettype($uuid_ns)), E_USER_WARNING);

return null;
}

if (!\is_string($name)) {
trigger_error(sprintf('uuid_generate_sha1() expects parameter 2 to be string, %s given', gettype($name)), E_USER_WARNING);
trigger_error(sprintf('uuid_generate_sha1() expects parameter 2 to be string, %s given', \gettype($name)), E_USER_WARNING);

return null;
}
Expand Down Expand Up @@ -140,7 +140,7 @@ public static function uuid_generate_sha1($uuid_ns, $name)
public static function uuid_is_valid($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_is_valid() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_is_valid() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -151,13 +151,13 @@ public static function uuid_is_valid($uuid)
public static function uuid_compare($uuid1, $uuid2)
{
if (!\is_string($uuid1)) {
trigger_error(sprintf('uuid_compare() expects parameter 1 to be string, %s given', gettype($uuid1)), E_USER_WARNING);
trigger_error(sprintf('uuid_compare() expects parameter 1 to be string, %s given', \gettype($uuid1)), E_USER_WARNING);

return null;
}

if (!\is_string($uuid2)) {
trigger_error(sprintf('uuid_compare() expects parameter 2 to be string, %s given', gettype($uuid2)), E_USER_WARNING);
trigger_error(sprintf('uuid_compare() expects parameter 2 to be string, %s given', \gettype($uuid2)), E_USER_WARNING);

return null;
}
Expand All @@ -184,7 +184,7 @@ public static function uuid_compare($uuid1, $uuid2)
public static function uuid_is_null($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_is_null() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_is_null() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -195,7 +195,7 @@ public static function uuid_is_null($uuid)
public static function uuid_type($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_type() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_type() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -214,7 +214,7 @@ public static function uuid_type($uuid)
public static function uuid_variant($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_variant() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_variant() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand Down Expand Up @@ -243,7 +243,7 @@ public static function uuid_variant($uuid)
public static function uuid_time($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_time() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_time() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -270,7 +270,7 @@ public static function uuid_time($uuid)
public static function uuid_mac($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_mac() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_mac() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -289,7 +289,7 @@ public static function uuid_mac($uuid)
public static function uuid_parse($uuid)
{
if (!\is_string($uuid)) {
trigger_error(sprintf('uuid_parse() expects parameter 1 to be string, %s given', gettype($uuid)), E_USER_WARNING);
trigger_error(sprintf('uuid_parse() expects parameter 1 to be string, %s given', \gettype($uuid)), E_USER_WARNING);

return null;
}
Expand All @@ -306,7 +306,7 @@ public static function uuid_parse($uuid)
public static function uuid_unparse($uuidAsBinary)
{
if (!\is_string($uuidAsBinary)) {
trigger_error(sprintf('uuid_unparse() expects parameter 1 to be string, %s given', gettype($uuidAsBinary)), E_USER_WARNING);
trigger_error(sprintf('uuid_unparse() expects parameter 1 to be string, %s given', \gettype($uuidAsBinary)), E_USER_WARNING);

return null;
}
Expand Down Expand Up @@ -427,12 +427,12 @@ private static function uuid_parse_as_array($uuid)
return null;
}

return [
return array(
'time_low' => hexdec($matches['time_low']),
'time_mid' => hexdec($matches['time_mid']),
'time_hi_and_version' => hexdec($matches['time_hi_and_version']),
'clock_seq' => hexdec($matches['clock_seq']),
'node' => hexdec($matches['node']),
];
);
}
}

0 comments on commit 664a442

Please sign in to comment.