Skip to content

Commit

Permalink
Merge branch 'phpdocs' of github.com:bavix/laravel-wallet into phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Jul 23, 2024
2 parents 47e8e63 + b62ef66 commit 0003c09
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 117 deletions.
97 changes: 1 addition & 96 deletions phpstan.src.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ parameters:
count: 1
path: src/Models/Transaction.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 1
path: src/Models/Transaction.php

-
message: "#^Parameter \\#1 \\$related of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:belongsTo\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -246,7 +241,7 @@ parameters:
path: src/Models/Transfer.php

-
message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\MorphOne\\<TRelatedModel of Illuminate\\\\Database\\\\Eloquent\\\\Model, Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:withTrashed\\(\\)\\.$#"
message: "#^Cannot call method getDynamicDefaultSlug\\(\\) on class\\-string\\|object\\.$#"
count: 2
path: src/Models/Wallet.php

Expand All @@ -255,66 +250,16 @@ parameters:
count: 2
path: src/Models/Wallet.php

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

-
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:getCurrencyAttribute\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Models/Wallet.php

-
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\\>\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:transactions\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\MorphMany\\<Bavix\\\\Wallet\\\\Models\\\\Transaction\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\MorphMany\\<TRelatedModel of Illuminate\\\\Database\\\\Eloquent\\\\Model, Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:transfers\\(\\) 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\\>\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Method Bavix\\\\Wallet\\\\Models\\\\Wallet\\:\\:walletTransactions\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<Bavix\\\\Wallet\\\\Models\\\\Transaction\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<TRelatedModel of Illuminate\\\\Database\\\\Eloquent\\\\Model, Bavix\\\\Wallet\\\\Models\\\\Wallet\\>\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$amount of method Bavix\\\\Wallet\\\\Interfaces\\\\Wallet\\:\\:forceWithdraw\\(\\) expects int\\|non\\-empty\\-string, int\\|string given\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:add\\(\\) expects float\\|int\\|non\\-empty\\-string, int\\|string given\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 7
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, int\\|string given\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$related of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:hasMany\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, mixed given\\.$#"
count: 6
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$related of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:morphMany\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, mixed given\\.$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#"
count: 2
Expand All @@ -325,41 +270,11 @@ parameters:
count: 2
path: src/Models/Wallet.php

-
message: "#^Parameter \\#2 \\$second of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:add\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
count: 5
path: src/Models/Wallet.php

-
message: "#^Parameter \\#2 \\$second of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:compare\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Parameter \\#2 \\$second of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:mul\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Parameter \\#2 \\$value of method Bavix\\\\Wallet\\\\Services\\\\RegulatorService\\:\\:sync\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$table \\(string\\) does not accept mixed\\.$#"
count: 1
path: src/Models/Wallet.php

-
message: "#^Unable to resolve the template type TRelatedModel in call to method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:hasMany\\(\\)$#"
count: 6
path: src/Models/Wallet.php

-
message: "#^Unable to resolve the template type TRelatedModel in call to method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:morphMany\\(\\)$#"
count: 2
path: src/Models/Wallet.php

-
message: "#^Parameter \\#1 \\$objects \\(non\\-empty\\-array\\<Bavix\\\\Wallet\\\\Internal\\\\Dto\\\\TransactionDtoInterface\\|Bavix\\\\Wallet\\\\Internal\\\\Dto\\\\TransferDtoInterface\\>\\) of method Bavix\\\\Wallet\\\\Services\\\\AssistantService\\:\\:getUuids\\(\\) should be compatible with parameter \\$objects \\(non\\-empty\\-array\\<string\\>\\) of method Bavix\\\\Wallet\\\\Services\\\\AssistantServiceInterface\\:\\:getUuids\\(\\)$#"
count: 1
Expand Down Expand Up @@ -410,21 +325,11 @@ parameters:
count: 2
path: src/Services/BookkeeperService.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:compare\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 2
path: src/Services/ConsistencyService.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathServiceInterface\\:\\:compare\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 2
path: src/Services/ConsistencyService.php

-
message: "#^Parameter \\#2 \\$second of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:compare\\(\\) expects float\\|int\\|non\\-empty\\-string, float\\|int\\|string given\\.$#"
count: 1
path: src/Services/ConsistencyService.php

-
message: "#^Parameter \\#2 \\$second of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathServiceInterface\\:\\:add\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
count: 1
Expand Down
20 changes: 0 additions & 20 deletions phpstan.tests.baseline.neon
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Method Bavix\\\\Wallet\\\\Test\\\\Infra\\\\Models\\\\Item\\:\\:boughtGoods\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<Bavix\\\\Wallet\\\\Models\\\\Transfer\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\<TRelatedModel of Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
count: 1
path: tests/Infra/Models/Item.php

-
message: "#^Parameter \\#1 \\$related of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:hasMany\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, class\\-string given\\.$#"
count: 1
path: tests/Infra/Models/Item.php

-
message: "#^Parameter \\#2 \\$currency of class Bavix\\\\Wallet\\\\Test\\\\Infra\\\\Values\\\\Money constructor expects string, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -45,16 +35,6 @@ parameters:
count: 1
path: tests/Infra/TestCase.php

-
message: "#^Parameter \\#1 \\$first of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathService\\:\\:compare\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
count: 2
path: tests/Units/Domain/CartTest.php

-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: tests/Units/Service/AtomicServiceTest.php

-
message: "#^Parameter \\#1 \\$number of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathServiceInterface\\:\\:abs\\(\\) expects float\\|int\\|non\\-empty\\-string, string given\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/Service/StorageServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function increase(string $uuid, float|int|string $value): string;
* @param non-empty-array<non-empty-string> $uuids The UUIDs of the stored values.
* @return non-empty-array<non-empty-string, non-empty-string> The stored values. The keys are the UUIDs and the values are the corresponding
* stored values.
*
*
* @throws RecordNotFoundException If any of the values with the given UUIDs are not found.
*/
public function multiGet(array $uuids): array;
Expand Down

0 comments on commit 0003c09

Please sign in to comment.