docs: extending the base wallet class #1190
Annotations
10 warnings
src/Internal/Decorator/StorageServiceLockDecorator.php#L40
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
}
public function sync(string $uuid, float|int|string $value) : bool
{
- return $this->multiSync([$uuid => $value]);
+ return $this->multiSync([]);
}
/**
* @throws RecordNotFoundException
|
src/Internal/Exceptions/TransactionRollbackException.php#L14
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
public function __construct(private readonly mixed $result)
{
- parent::__construct();
+
}
public function getResult() : mixed
{
|
src/Internal/Repository/WalletRepository.php#L88
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
*/
public function getById(int $id) : Wallet
{
- return $this->getBy(['id' => $id]);
+ return $this->getBy([]);
}
/**
* @throws ModelNotFoundException
|
src/Internal/Repository/WalletRepository.php#L98
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
*/
public function getByUuid(string $uuid) : Wallet
{
- return $this->getBy(['uuid' => $uuid]);
+ return $this->getBy([]);
}
/**
* @throws ModelNotFoundException
|
src/Internal/Repository/WalletRepository.php#L108
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
*/
public function getBySlug(string $holderType, int|string $holderId, string $slug) : Wallet
{
- return $this->getBy(['holder_type' => $holderType, 'holder_id' => $holderId, 'slug' => $slug]);
+ return $this->getBy(['holder_id' => $holderId, 'slug' => $slug]);
}
/**
* @param array<int|string> $holderIds
|
src/Internal/Service/LockService.php#L81
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
$lockProvider = $this->getLockProvider();
foreach ($keys as $key) {
if (!$this->isBlocked($key)) {
- continue;
+ break;
}
$lockProvider->lock(self::LOCK_KEY . $key, $this->seconds)->forceRelease();
$this->lockedKeys->delete(self::INNER_KEYS . $key);
|
src/Models/Transaction.php#L77
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
/**
* @return MorphTo<Model, self>
*/
- public function payable() : MorphTo
+ protected function payable() : MorphTo
{
return $this->morphTo();
}
|
src/Models/Wallet.php#L135
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
return (string) $this->getRawOriginal('balance', 0);
}
- public function getAvailableBalanceAttribute() : float|int|string
+ protected function getAvailableBalanceAttribute() : float|int|string
{
return $this->walletTransactions()->where('confirmed', true)->sum('amount');
}
|
src/Models/Wallet.php#L156
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
return (string) ($this->meta['credit'] ?? '0');
}
- public function getCurrencyAttribute() : string
+ protected function getCurrencyAttribute() : string
{
return $this->meta['currency'] ?? Str::upper($this->slug);
}
|
src/Objects/Cart.php#L83
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withItems(iterable $products) : self
{
- $self = clone $this;
+ $self = $this;
foreach ($products as $product) {
$self = $self->withItem($product);
}
|
The logs for this run have expired and are no longer available.
Loading