Skip to content

Commit 557053c

Browse files
committed
update baseline
1 parent d9656fb commit 557053c

File tree

5 files changed

+22
-52
lines changed

5 files changed

+22
-52
lines changed

phpstan.src.baseline.neon

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ parameters:
135135
count: 1
136136
path: src/Models/Transaction.php
137137

138-
-
139-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:div\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
140-
count: 1
141-
path: src/Models/Transaction.php
142-
143138
-
144139
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
145140
count: 1
@@ -202,14 +197,19 @@ parameters:
202197

203198
-
204199
message: "#^Cannot cast mixed to string\\.$#"
205-
count: 1
200+
count: 2
206201
path: src/Models/Wallet.php
207202

208203
-
209204
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:getBalanceFloatAttribute\\(\\) should return non\\-empty\\-string but returns string\\.$#"
210205
count: 1
211206
path: src/Models/Wallet.php
212207

208+
-
209+
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:getCurrencyAttribute\\(\\) should return string but returns mixed\\.$#"
210+
count: 1
211+
path: src/Models/Wallet.php
212+
213213
-
214214
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:receivedTransfers\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<Bavix\\\\Wallet\\\\Models\\\\Transfer\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<TRelatedModel of Illuminate\\\\Database\\\\Eloquent\\\\Model, Bavix\\\\Wallet\\\\Models\\\\Wallet\\>\\.$#"
215215
count: 2
@@ -255,11 +255,6 @@ parameters:
255255
count: 1
256256
path: src/Models/Wallet.php
257257

258-
-
259-
message: "#^Parameter \\#1 \\$number of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:negative\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
260-
count: 1
261-
path: src/Models/Wallet.php
262-
263258
-
264259
message: "#^Parameter \\#1 \\$related of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:hasMany\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, mixed given\\.$#"
265260
count: 6
@@ -295,11 +290,6 @@ parameters:
295290
count: 1
296291
path: src/Models/Wallet.php
297292

298-
-
299-
message: "#^Parameter \\#2 \\$value of method Bavix\\\\Wallet\\\\Services\\\\RegulatorService\\:\\:increase\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
300-
count: 1
301-
path: src/Models/Wallet.php
302-
303293
-
304294
message: "#^Parameter \\#2 \\$value of method Bavix\\\\Wallet\\\\Services\\\\RegulatorService\\:\\:sync\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
305295
count: 1
@@ -360,11 +350,6 @@ parameters:
360350
count: 1
361351
path: src/Services/BookkeeperService.php
362352

363-
-
364-
message: "#^Parameter \\#1 \\$uuid of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:forget\\(\\) expects non\\-empty\\-string, string given\\.$#"
365-
count: 1
366-
path: src/Services/BookkeeperService.php
367-
368353
-
369354
message: "#^Parameter \\#1 \\$uuids of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:multiGet\\(\\) expects non\\-empty\\-array\\<non\\-empty\\-string\\>, non\\-empty\\-array\\<int, string\\> given\\.$#"
370355
count: 2
@@ -420,26 +405,6 @@ parameters:
420405
count: 1
421406
path: src/Services/RegulatorService.php
422407

423-
-
424-
message: "#^Parameter \\#1 \\$uuid of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:forget\\(\\) expects non\\-empty\\-string, string given\\.$#"
425-
count: 1
426-
path: src/Services/RegulatorService.php
427-
428-
-
429-
message: "#^Parameter \\#1 \\$uuid of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:get\\(\\) expects non\\-empty\\-string, string given\\.$#"
430-
count: 1
431-
path: src/Services/RegulatorService.php
432-
433-
-
434-
message: "#^Parameter \\#1 \\$uuid of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:increase\\(\\) expects non\\-empty\\-string, string given\\.$#"
435-
count: 1
436-
path: src/Services/RegulatorService.php
437-
438-
-
439-
message: "#^Parameter \\#1 \\$uuid of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StorageServiceInterface\\:\\:sync\\(\\) expects non\\-empty\\-string, string given\\.$#"
440-
count: 2
441-
path: src/Services/RegulatorService.php
442-
443408
-
444409
message: "#^PHPDoc tag @return with type string is incompatible with native type bool\\.$#"
445410
count: 1

phpstan.tests.baseline.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ parameters:
1010
count: 1
1111
path: tests/Infra/Models/Item.php
1212

13+
-
14+
message: "#^Parameter \\#2 \\$currency of class Bavix\\\\Wallet\\\\Test\\\\Infra\\\\Values\\\\Money constructor expects string, mixed given\\.$#"
15+
count: 1
16+
path: tests/Infra/PackageModels/TransactionMoney.php
17+
1318
-
1419
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathServiceInterface\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
1520
count: 1

src/Models/Transaction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
* @property class-string $payable_type
2323
* @property int|string $payable_id
2424
* @property int $wallet_id
25-
* @property string $uuid
25+
* @property non-empty-string $uuid
2626
* @property string $type
27-
* @property string $amount
27+
* @property non-empty-string $amount
2828
* @property int $amountInt
29-
* @property string $amountFloat
29+
* @property non-empty-string $amountFloat
3030
* @property bool $confirmed
31-
* @property array $meta
31+
* @property array<mixed> $meta
3232
* @property Wallet $payable
3333
* @property WalletModel $wallet
3434
* @property DateTimeInterface $created_at

src/Models/Transfer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
*
1717
* @property string $status
1818
* @property string $status_last
19-
* @property string $discount
19+
* @property non-empty-string $discount
2020
* @property int $deposit_id
2121
* @property int $withdraw_id
2222
* @property Wallet $from
2323
* @property int $from_id
2424
* @property Wallet $to
2525
* @property int $to_id
26-
* @property string $uuid
27-
* @property string $fee
26+
* @property non-empty-string $uuid
27+
* @property non-empty-string $fee
2828
* @property ?array<mixed> $extra
2929
* @property Transaction $deposit
3030
* @property Transaction $withdraw

src/Models/Wallet.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
* Class Wallet.
3333
*
3434
* @property class-string $holder_type
35-
* @property int|string $holder_id
35+
* @property int|non-empty-string $holder_id
3636
* @property string $name
3737
* @property string $slug
38-
* @property string $uuid
38+
* @property non-empty-string $uuid
3939
* @property string $description
40-
* @property null|array $meta
40+
* @property null|array<mixed> $meta
4141
* @property int $decimal_places
4242
* @property Model $holder
43-
* @property string $credit
43+
* @property non-empty-string $credit
4444
* @property string $currency
4545
* @property DateTimeInterface $created_at
4646
* @property DateTimeInterface $updated_at

0 commit comments

Comments
 (0)