@@ -102,14 +102,14 @@ |
||
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | - array_walk($addressPaths, function ($addressPath) use (&$macs) { |
|
105 | + array_walk($addressPaths, function($addressPath) use (&$macs) { |
|
106 | 106 | $macs[] = file_get_contents($addressPath); |
107 | 107 | }); |
108 | 108 | |
109 | 109 | $macs = array_map('trim', $macs); |
110 | 110 | |
111 | 111 | // remove invalid entries |
112 | - $macs = array_filter($macs, function ($mac) { |
|
112 | + $macs = array_filter($macs, function($mac) { |
|
113 | 113 | return |
114 | 114 | // localhost adapter |
115 | 115 | $mac !== '00:00:00:00:00:00' && |
@@ -102,14 +102,16 @@ |
||
102 | 102 | return false; |
103 | 103 | } |
104 | 104 | |
105 | - array_walk($addressPaths, function ($addressPath) use (&$macs) { |
|
105 | + array_walk($addressPaths, function ($addressPath) use (&$macs) |
|
106 | + { |
|
106 | 107 | $macs[] = file_get_contents($addressPath); |
107 | 108 | }); |
108 | 109 | |
109 | 110 | $macs = array_map('trim', $macs); |
110 | 111 | |
111 | 112 | // remove invalid entries |
112 | - $macs = array_filter($macs, function ($mac) { |
|
113 | + $macs = array_filter($macs, function ($mac) |
|
114 | + { |
|
113 | 115 | return |
114 | 116 | // localhost adapter |
115 | 117 | $mac !== '00:00:00:00:00:00' && |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | |
564 | 564 | public function getUrn() |
565 | 565 | { |
566 | - return 'urn:uuid:' . $this->toString(); |
|
566 | + return 'urn:uuid:'.$this->toString(); |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | public function getVariant() |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | return true; |
673 | 673 | } |
674 | 674 | |
675 | - if (!preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) { |
|
675 | + if (!preg_match('/'.self::VALID_PATTERN.'/D', $uuid)) { |
|
676 | 676 | return false; |
677 | 677 | } |
678 | 678 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $bytes = ''; |
34 | 34 | |
35 | 35 | for ($i = 1; $i <= $length; $i++) { |
36 | - $bytes = chr(mt_rand(0, 255)) . $bytes; |
|
36 | + $bytes = chr(mt_rand(0, 255)).$bytes; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $bytes; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $lsbTime = str_pad($this->converter->toHex($this->timestamp()), self::TIMESTAMP_BYTES * 2, '0', STR_PAD_LEFT); |
74 | 74 | |
75 | - return hex2bin(str_pad(bin2hex($hash), $length - self::TIMESTAMP_BYTES, '0') . $lsbTime); |
|
75 | + return hex2bin(str_pad(bin2hex($hash), $length - self::TIMESTAMP_BYTES, '0').$lsbTime); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -84,6 +84,6 @@ discard block |
||
84 | 84 | { |
85 | 85 | $time = explode(' ', microtime(false)); |
86 | 86 | |
87 | - return $time[1] . substr($time[0], 2, 5); |
|
87 | + return $time[1].substr($time[0], 2, 5); |
|
88 | 88 | } |
89 | 89 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function calculateTime($seconds, $microSeconds) |
36 | 36 | { |
37 | 37 | throw new UnsatisfiedDependencyException( |
38 | - 'When calling ' . __METHOD__ . ' on a 32-bit system, ' |
|
38 | + 'When calling '.__METHOD__.' on a 32-bit system, ' |
|
39 | 39 | . 'Moontoast\Math\BigNumber must be present.' |
40 | 40 | ); |
41 | 41 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function fromHex($hex) |
35 | 35 | { |
36 | 36 | throw new UnsatisfiedDependencyException( |
37 | - 'Cannot call ' . __METHOD__ . ' without support for large ' |
|
37 | + 'Cannot call '.__METHOD__.' without support for large ' |
|
38 | 38 | . 'integers, since integer is an unsigned ' |
39 | 39 | . '128-bit integer; Moontoast\Math\BigNumber is required.' |
40 | 40 | ); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | public function toHex($integer) |
51 | 51 | { |
52 | 52 | throw new UnsatisfiedDependencyException( |
53 | - 'Cannot call ' . __METHOD__ . ' without support for large ' |
|
53 | + 'Cannot call '.__METHOD__.' without support for large ' |
|
54 | 54 | . 'integers, since integer is an unsigned ' |
55 | 55 | . '128-bit integer; Moontoast\Math\BigNumber is required. ' |
56 | 56 | ); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | $nameParsed = implode('-', $components); |
144 | 144 | |
145 | 145 | if (!Uuid::isValid($nameParsed)) { |
146 | - throw new InvalidUuidStringException('Invalid UUID string: ' . $encodedUuid); |
|
146 | + throw new InvalidUuidStringException('Invalid UUID string: '.$encodedUuid); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | return $components; |
@@ -96,9 +96,9 @@ |
||
96 | 96 | $last48Bits = $components[4]; |
97 | 97 | if (count($components) == 6) { |
98 | 98 | $last48Bits = $components[5]; |
99 | - $components[5] = $components[0] . $components[1]; |
|
99 | + $components[5] = $components[0].$components[1]; |
|
100 | 100 | } else { |
101 | - $components[4] = $components[0] . $components[1]; |
|
101 | + $components[4] = $components[0].$components[1]; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | $components[0] = substr($last48Bits, 0, 8); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $hex = unpack('H*', $bytes)[1]; |
62 | 62 | |
63 | 63 | // Rearrange the fields to their original order |
64 | - $hex = substr($hex, 8, 4) . substr($hex, 12, 4) . substr($hex, 4, 4) . substr($hex, 0, 4) . substr($hex, 16); |
|
64 | + $hex = substr($hex, 8, 4).substr($hex, 12, 4).substr($hex, 4, 4).substr($hex, 0, 4).substr($hex, 16); |
|
65 | 65 | |
66 | 66 | return $this->decode($hex); |
67 | 67 | } |