|
21 | 21 | $point = (new Point(91, 0, 4326)); |
22 | 22 | TestPlace::factory()->create(['point' => $point]); |
23 | 23 | })->toThrow(QueryException::class); |
24 | | -})->skip(fn() => !(new AxisOrder)->supported(DB::connection())); |
| 24 | +})->skip(fn () => ! (new AxisOrder)->supported(DB::connection())); |
25 | 25 |
|
26 | 26 | it('throws exception when generating geometry with invalid latitude - without axis-order', function (): void { |
27 | 27 | expect(function (): void { |
|
32 | 32 | ->withDistanceSphere('point', new Point(1, 1, 4326)) |
33 | 33 | ->firstOrFail(); |
34 | 34 | })->toThrow(QueryException::class); |
35 | | -})->skip(fn() => (new AxisOrder)->supported(DB::connection())); |
| 35 | +})->skip(fn () => (new AxisOrder)->supported(DB::connection())); |
36 | 36 |
|
37 | 37 | it('throws exception when generating geometry with invalid longitude', function (): void { |
38 | 38 | expect(function (): void { |
39 | 39 | $point = (new Point(0, 181, 4326)); |
40 | 40 | TestPlace::factory()->create(['point' => $point]); |
41 | 41 | })->toThrow(QueryException::class); |
42 | | -})->skip(fn() => !(new AxisOrder)->supported(DB::connection())); |
| 42 | +})->skip(fn () => ! (new AxisOrder)->supported(DB::connection())); |
43 | 43 |
|
44 | 44 | it('throws exception when generating geometry with invalid longitude - without axis-order', function (): void { |
45 | 45 | expect(function (): void { |
|
50 | 50 | ->withDistanceSphere('point', new Point(1, 1, 4326)) |
51 | 51 | ->firstOrFail(); |
52 | 52 | })->toThrow(QueryException::class); |
53 | | -})->skip(fn() => (new AxisOrder)->supported(DB::connection())); |
| 53 | +})->skip(fn () => (new AxisOrder)->supported(DB::connection())); |
54 | 54 |
|
55 | 55 | it('throws exception when generating geometry from other geometry WKT', function (): void { |
56 | 56 | expect(function (): void { |
|
86 | 86 | $sqlExpression = $point->toSqlExpression(DB::connection()); |
87 | 87 |
|
88 | 88 | expect($sqlExpression)->toEqual("ST_GeomFromText('POINT(180 0)', 4326, 'axis-order=long-lat')"); |
89 | | -})->skip(fn() => !(new AxisOrder)->supported(DB::connection())); |
| 89 | +})->skip(fn () => ! (new AxisOrder)->supported(DB::connection())); |
90 | 90 |
|
91 | 91 | it('creates an SQL expression from a geometry - without axis-order', function (): void { |
92 | 92 | $point = new Point(0, 180, 4326); |
93 | 93 |
|
94 | 94 | $sqlExpression = $point->toSqlExpression(DB::connection()); |
95 | 95 |
|
96 | 96 | expect($sqlExpression)->toEqual("ST_GeomFromText('POINT(180 0)', 4326)"); |
97 | | -})->skip(fn() => (new AxisOrder)->supported(DB::connection())); |
| 97 | +})->skip(fn () => (new AxisOrder)->supported(DB::connection())); |
98 | 98 |
|
99 | 99 | it('creates a geometry object from a geo json array', function (): void { |
100 | 100 | $point = new Point(0, 180); |
|
0 commit comments