chore: coding style changes

This commit is contained in:
nuno maduro
2026-08-07 14:52:56 +01:00
parent eb88513baf
commit 42d9b777bf
221 changed files with 139 additions and 3086 deletions
+11 -22
View File
@@ -10,13 +10,9 @@ it('expects on each item', function (): void {
expect([1, 1, 1])
->each()
->toEqual(1)
->and(static::getCount())->toBe(3); // + 1 assertion
expect([1, 1, 1])
->each
->toEqual(1);
expect(static::getCount())->toBe(7);
->and(static::getCount())->toBe(3)
->and([1, 1, 1])->each->toEqual(1)
->and(static::getCount())->toBe(7);
});
it('chains expectations on each item', function (): void {
@@ -24,14 +20,8 @@ it('chains expectations on each item', function (): void {
->each()
->toBeInt()
->toEqual(1)
->and(static::getCount())->toBe(6); // + 1 assertion
expect([2, 2, 2])
->each
->toBeInt
->toEqual(2);
expect(static::getCount())->toBe(13);
->and(static::getCount())->toBe(6)->and([2, 2, 2])->each->toBeInt->toEqual(2)
->and(static::getCount())->toBe(13);
});
test('opposite expectations on each item', function (): void {
@@ -60,18 +50,17 @@ test('chained opposite and non-opposite expectations', function (): void {
it('can add expectations via "and"', function (): void {
expect([1, 2, 3])
->each()
->toBeInt // + 3
->toBeInt
->and([4, 5, 6])
->each
->toBeLessThan(7) // + 3
->toBeLessThan(7)
->not
->toBeLessThan(3)
->toBeGreaterThan(3) // + 3
->toBeGreaterThan(3)
->and('Hello World')
->toBeString // + 1
->toEqual('Hello World'); // + 1
expect(static::getCount())->toBe(14);
->toBeString
->toEqual('Hello World')
->and(static::getCount())->toBe(14);
});
it('accepts callables', function (): void {