Skip to content

Commit 5cb0664

Browse files
committed
refactor(traits): apply PSR-12 coding style to closure in HasSpatial trait
1 parent 14c3ab5 commit 5cb0664

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

CHANGELOG.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,62 @@
33
All notable changes to `laravel-spatial` will be documented in this file
44

55
## 3.1.1 - 2025-06-12
6-
76
- Fixed `$distance` parameter type from `int` to `float` in `scopeWithinDistanceTo` and related methods to properly handle decimal distance values returned by `ST_Distance` function.
87

98
## 3.1.0 - 2025-05-14
10-
119
- Expression support added to `get()` method in `LocationCast`.
1210
- Replaced `@test` annotations with `#[Test]` attributes across the test suite for modern PHPUnit syntax.
1311

1412
## 3.0.0 - 2025-02-20
15-
1613
- Laravel 12 and PHP 8.4 support added.
1714
- Laravel 10 and below versions are not supported anymore.
1815
- PHP 8.1 and below versions are not supported anymore.
1916

2017
## 2.0.1 - 2024-11-27
21-
2218
- Fix the incorrect parameter count error while using `ST_SRID` functions with `MariaDB`.
2319

2420
## 2.0.0 - 2024-07-25
25-
2621
- Added Laravel 11 and PHP 8.3 support
2722

2823
## 1.7.0 - 2023-05-11
29-
3024
- PHP 8.2 support added.
3125

3226
## 1.6.1 - 2023-04-04
33-
3427
- Changed `toGeomFromTextString()` to `toGeomFromText()` in Readme.
3528
- Fixed `with_wkt_options` configuration.
3629

3730
## 1.6.0 - 2023-03-30
38-
3931
- Added `MariaDB` support to spatial functions.
4032
- Readme updated for adding a location column with default value to an existing table.
4133
- `toGeomFromTextString()` method added to `Point` class for bulk insert/update operations.
4234

4335
## 1.4.2 - 2023-02-16
44-
4536
- Laravel 10 support added.
4637

4738
## 1.4.1 - 2022-09-05
48-
4939
- Doctrtine unknown type error fixed.
5040

5141
## 1.4.0 - 2022-07-24
52-
5342
- Locations that have zero points are excluded while getting the distance to a given location in `withingDistanceTo` scope.
5443

5544
## 1.3.0 - 2022-06-24
56-
5745
- `toWkt()` method added to `Point` class for getting the coordinates as well known text.
5846
- `toPair()` method added to `Point` class for getting the coordinates as pair.
5947
- `toArray()` method added to `Point` class for getting the coordinates as array.
6048

6149
## 1.2.0 - 2022-02-08
62-
6350
- Laravel 9 support added.
6451

6552
# 1.1.2 - 2022-03-08
66-
6753
- Bug fixed for casting location columns that is null.
6854

6955
# 1.1.1 - 2022-01-20
70-
7156
- `axis-order` added to setter of `LocationCast`.
7257
- `axis-order` added to query in `HasSpatial` trait.
7358

7459
# 1.1.0 - 2022-01-20
75-
7660
- `Point` type added to Doctrine mapped types in the service provider.
7761
- SRID support added to setter of `LocationCast`.
7862

7963
## 1.0.0 - 2022-01-18
80-
8164
- initial release

src/Traits/HasSpatial.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function newQuery(): Builder
6464

6565
public function getLocationCastedAttributes(): Collection
6666
{
67-
return collect($this->getCasts())->filter(fn($cast) => $cast === LocationCast::class)->keys();
67+
return collect($this->getCasts())->filter(fn ($cast) => $cast === LocationCast::class)->keys();
6868
}
6969

7070
private function selectDistanceToMysqlAndPostgres(Builder $query, string $column, Point $point): Builder

0 commit comments

Comments
 (0)