There was an error while loading. Please reload this page.
Str
SteamID
1 parent 7de30ac commit d6d7ab9Copy full SHA for d6d7ab9
1 file changed
src/SteamID.php
@@ -3,7 +3,6 @@
3
namespace Astrotomic\SteamSdk;
4
5
use Closure;
6
-use Illuminate\Support\Str;
7
use InvalidArgumentException;
8
use Stringable;
9
use xPaw\Steam\SteamID as xPawSteamID;
@@ -19,7 +18,7 @@ public static function make(string|int $id): self
19
18
20
public function __construct(string|int $id)
21
{
22
- if (is_numeric($id) && Str::isMatch('/^\d+$/', $id)) {
+ if (is_numeric($id) && preg_match('/^\d+$/', $id) === 1) {
23
$id = (int) $id;
24
}
25
@@ -36,7 +35,7 @@ function (string|int $id): ?xPawSteamID {
36
35
},
37
function (string|int $id): ?xPawSteamID {
38
if (is_string($id) && str_starts_with($id, 'steam:')) {
39
- return new xPawSteamID(hexdec(Str::after($id, 'steam:')));
+ return new xPawSteamID(hexdec(substr($id, 6)));
40
41
42
return null;
0 commit comments