src/Generator/Binary/FloatingTimeGenerator.php 1 location
|
@@ 51-53 (lines=3) @@
|
48 |
|
*/ |
49 |
|
public function __construct($time_length = 45, $time_offset = 0) |
50 |
|
{ |
51 |
|
if (PHP_INT_SIZE * 8 < 64) { |
52 |
|
throw new ProcessorArchitectureException(sprintf('This generator require 64-bit mode of processor architecture. Your processor architecture support %d-bit mode.', PHP_INT_SIZE * 8)); |
53 |
|
} |
54 |
|
|
55 |
|
if (!is_int($time_length)) { |
56 |
|
throw new ArgumentTypeException(sprintf('Length of time for UID should be integer, got "%s" instead.', gettype($time_length))); |
src/Generator/Binary/RandomBinaryGenerator.php 1 location
|
@@ 37-39 (lines=3) @@
|
34 |
|
throw new ZeroArgumentException(sprintf('Length of bitmap for UID should be grate then "0", got "%d" instead.', $uid_bitmap_length)); |
35 |
|
} |
36 |
|
|
37 |
|
if ($uid_bitmap_length >= PHP_INT_SIZE * 8) { |
38 |
|
throw new ProcessorArchitectureException(sprintf('Your processor architecture support %d-bit mode, got "%d" instead.', PHP_INT_SIZE * 8, $uid_bitmap_length)); |
39 |
|
} |
40 |
|
|
41 |
|
$this->uid_bitmap_length = $uid_bitmap_length; |
42 |
|
} |
src/Generator/Binary/SnowflakeGenerator.php 1 location
|
@@ 80-82 (lines=3) @@
|
77 |
|
*/ |
78 |
|
public function __construct($data_center, $machine, $time_offset = 0) |
79 |
|
{ |
80 |
|
if (PHP_INT_SIZE * 8 < 64) { |
81 |
|
throw new ProcessorArchitectureException(sprintf('This generator require 64-bit mode of processor architecture. Your processor architecture support %d-bit mode.', PHP_INT_SIZE * 8)); |
82 |
|
} |
83 |
|
|
84 |
|
if (!is_int($data_center)) { |
85 |
|
throw new ArgumentTypeException(sprintf('Data center should be integer, got "%s" instead.', gettype($data_center))); |
src/Generator/Binary/TimeBinaryGenerator.php 1 location
|
@@ 68-70 (lines=3) @@
|
65 |
|
*/ |
66 |
|
public function __construct($prefix_length = 9, $time_length = 45, $time_offset = 0) |
67 |
|
{ |
68 |
|
if (PHP_INT_SIZE * 8 < 64) { |
69 |
|
throw new ProcessorArchitectureException(sprintf('This generator require 64-bit mode of processor architecture. Your processor architecture support %d-bit mode.', PHP_INT_SIZE * 8)); |
70 |
|
} |
71 |
|
|
72 |
|
if (!is_int($prefix_length)) { |
73 |
|
throw new ArgumentTypeException(sprintf('Length of prefix for UID should be integer, got "%s" instead.', gettype($prefix_length))); |