Skip to content

Commit a4a3a20

Browse files
committed
fixed psalm
1 parent 21c0757 commit a4a3a20

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Money.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class Money implements Arrayable, Castable, Jsonable, JsonSerializable, Renderab
199199

200200
protected bool $mutable = false;
201201

202-
protected static ?string $locale;
202+
protected static string $locale;
203203

204204
/**
205205
* Create a new instance.
@@ -306,7 +306,7 @@ public static function getLocale(): string
306306

307307
public static function setLocale(?string $locale): void
308308
{
309-
static::$locale = str_replace('-', '_', $locale);
309+
static::$locale = str_replace('-', '_', (string) $locale);
310310
}
311311

312312
/**

tests/MoneyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testStringThrowsException()
5959

6060
public function testLocale()
6161
{
62-
Money::setLocale('');
62+
Money::setLocale(null);
6363
$this->assertEquals('en_GB', Money::getLocale());
6464
Money::setLocale('en_US');
6565
$this->assertEquals('en_US', Money::getLocale());

0 commit comments

Comments
 (0)