Skip to content

Commit b1dcddb

Browse files
committed
[10.x] alloc optimize
1 parent cbb4199 commit b1dcddb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Internal/Service/FeatureService.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
*/
1010
final class FeatureService implements FeatureServiceInterface
1111
{
12-
public function isCurrencyStrictMode(): bool
12+
private bool $value;
13+
14+
public function __construct()
1315
{
14-
/**
15-
* @var $value bool|int
16-
*/
17-
$value = config('wallet.features.currency_strict', false);
16+
$this->value = (bool) config('wallet.features.currency_strict', false);
17+
}
1818

19-
return (bool) $value;
19+
public function isCurrencyStrictMode(): bool
20+
{
21+
return $this->value;
2022
}
2123
}

0 commit comments

Comments
 (0)