Fix various phpstan issues.

This commit is contained in:
James Cole
2023-11-04 11:31:14 +01:00
parent ef428a0226
commit 0220cf9784
64 changed files with 195 additions and 153 deletions

View File

@@ -42,7 +42,7 @@ trait AmountCollection
public function amountIs(string $amount): GroupCollectorInterface
{
$this->query->where(
static function (EloquentBuilder $q) use ($amount) {
static function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->where('source.amount', app('steam')->negative($amount));
}
);
@@ -56,7 +56,7 @@ trait AmountCollection
public function amountIsNot(string $amount): GroupCollectorInterface
{
$this->query->where(
static function (EloquentBuilder $q) use ($amount) {
static function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->where('source.amount', '!=', app('steam')->negative($amount));
}
);
@@ -74,7 +74,7 @@ trait AmountCollection
public function amountLess(string $amount): GroupCollectorInterface
{
$this->query->where(
function (EloquentBuilder $q) use ($amount) {
function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->where('destination.amount', '<=', app('steam')->positive($amount));
}
);
@@ -92,7 +92,7 @@ trait AmountCollection
public function amountMore(string $amount): GroupCollectorInterface
{
$this->query->where(
function (EloquentBuilder $q) use ($amount) {
function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->where('destination.amount', '>=', app('steam')->positive($amount));
}
);
@@ -110,7 +110,7 @@ trait AmountCollection
public function foreignAmountIs(string $amount): GroupCollectorInterface
{
$this->query->where(
static function (EloquentBuilder $q) use ($amount) {
static function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->whereNotNull('source.foreign_amount');
$q->where('source.foreign_amount', app('steam')->negative($amount));
}
@@ -129,7 +129,7 @@ trait AmountCollection
public function foreignAmountIsNot(string $amount): GroupCollectorInterface
{
$this->query->where(
static function (EloquentBuilder $q) use ($amount) {
static function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->whereNull('source.foreign_amount');
$q->orWhere('source.foreign_amount', '!=', app('steam')->negative($amount));
}
@@ -148,7 +148,7 @@ trait AmountCollection
public function foreignAmountLess(string $amount): GroupCollectorInterface
{
$this->query->where(
function (EloquentBuilder $q) use ($amount) {
function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->whereNotNull('destination.foreign_amount');
$q->where('destination.foreign_amount', '<=', app('steam')->positive($amount));
}
@@ -167,7 +167,7 @@ trait AmountCollection
public function foreignAmountMore(string $amount): GroupCollectorInterface
{
$this->query->where(
function (EloquentBuilder $q) use ($amount) {
function (EloquentBuilder $q) use ($amount) { // @phpstan-ignore-line
$q->whereNotNull('destination.foreign_amount');
$q->where('destination.foreign_amount', '>=', app('steam')->positive($amount));
}