Skip to content

Commit

Permalink
chore: duster fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patoui committed Feb 2, 2025
1 parent c34e940 commit f58c20d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/ClickhouseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public function addBinding($value, $type = 'where'): self
* Add a "where month" statement to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $column
* @param \DateTimeInterface|string|int|null $operator
* @param \DateTimeInterface|string|int|null $value
* @param DateTimeInterface|string|int|null $operator
* @param DateTimeInterface|string|int|null $value
* @param string $boolean
* @return $this
*/
Expand Down Expand Up @@ -171,8 +171,8 @@ public function whereMonth($column, $operator, $value = null, $boolean = 'and')
* Add a "where day" statement to the query.
*
* @param \Illuminate\Contracts\Database\Query\Expression|string $column
* @param \DateTimeInterface|string|int|null $operator
* @param \DateTimeInterface|string|int|null $value
* @param DateTimeInterface|string|int|null $operator
* @param DateTimeInterface|string|int|null $value
* @param string $boolean
* @return $this
*/
Expand Down
10 changes: 5 additions & 5 deletions tests/Feature/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function test_where_date(): void
);
self::assertSame(
1,
Analytic::whereDate('ts', new DateTimeImmutable())->count()
Analytic::whereDate('ts', new DateTimeImmutable)->count()
);
}

Expand All @@ -84,7 +84,7 @@ public function test_where_day(): void
);
self::assertSame(
1,
Analytic::whereDay('ts', new DateTimeImmutable())->count()
Analytic::whereDay('ts', new DateTimeImmutable)->count()
);
}

Expand All @@ -101,7 +101,7 @@ public function test_where_month(): void
);
self::assertSame(
1,
Analytic::whereMonth('ts', new DateTimeImmutable())->count()
Analytic::whereMonth('ts', new DateTimeImmutable)->count()
);
}

Expand All @@ -118,7 +118,7 @@ public function test_where_year(): void
);
self::assertSame(
1,
Analytic::whereYear('ts', new DateTimeImmutable())->count()
Analytic::whereYear('ts', new DateTimeImmutable)->count()
);
}

Expand All @@ -138,7 +138,7 @@ public function test_where_time(): void
1,
Analytic::whereTime(
'ts',
(new DateTimeImmutable())->setTimestamp($time)
(new DateTimeImmutable)->setTimestamp($time)
)->count()
);
}
Expand Down
11 changes: 5 additions & 6 deletions tests/Feature/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Patoui\LaravelClickhouse\Tests\Feature;

use DateInterval;
use DateTimeImmutable;
use Illuminate\Support\Facades\DB;
use Patoui\LaravelClickhouse\Tests\TestCase;
Expand Down Expand Up @@ -101,7 +100,7 @@ public function test_where_date(): void
1,
DB::connection('clickhouse')
->table('analytics')
->whereDate('ts', new DateTimeImmutable())
->whereDate('ts', new DateTimeImmutable)
->count()
);
}
Expand Down Expand Up @@ -130,7 +129,7 @@ public function test_where_day(): void
1,
DB::connection('clickhouse')
->table('analytics')
->whereDay('ts', new DateTimeImmutable())
->whereDay('ts', new DateTimeImmutable)
->count()
);
}
Expand Down Expand Up @@ -159,7 +158,7 @@ public function test_where_month(): void
1,
DB::connection('clickhouse')
->table('analytics')
->whereMonth('ts', new DateTimeImmutable())
->whereMonth('ts', new DateTimeImmutable)
->count()
);
}
Expand Down Expand Up @@ -188,7 +187,7 @@ public function test_where_year(): void
1,
DB::connection('clickhouse')
->table('analytics')
->whereYear('ts', new DateTimeImmutable())
->whereYear('ts', new DateTimeImmutable)
->count()
);
}
Expand Down Expand Up @@ -218,7 +217,7 @@ public function test_where_time(): void
1,
DB::connection('clickhouse')
->table('analytics')
->whereTime('ts', (new DateTimeImmutable())->setTimestamp($time))
->whereTime('ts', (new DateTimeImmutable)->setTimestamp($time))
->count()
);
}
Expand Down

0 comments on commit f58c20d

Please sign in to comment.