Skip to content

Commit

Permalink
Better Psalm annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 14, 2022
1 parent 2ea4855 commit 3a7f757
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

**Improvements**

- Better Psalm annotations for geometry getters
- Removed outdated suggestion in `composer.json`

## [0.8.0](https://github.com/brick/geo/releases/tag/0.8.0) - 2022-10-11
Expand Down
2 changes: 2 additions & 0 deletions src/CircularString.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public function pointN(int $n) : Point
/**
* Returns the points that compose this CircularString.
*
* @psalm-return list<Point>
*
* @return Point[]
*/
public function points() : array
Expand Down
2 changes: 2 additions & 0 deletions src/CompoundCurve.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ public function curveN(int $n) : Curve
/**
* Returns the curves that compose this CompoundCurve.
*
* @psalm-return list<Curve>
*
* @return Curve[]
*/
public function curves() : array
Expand Down
2 changes: 2 additions & 0 deletions src/GeometryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public function geometryN(int $n) : Geometry
/**
* Returns the geometries that compose this GeometryCollection.
*
* @psalm-return list<T>
*
* @return Geometry[]
*/
public function geometries() : array
Expand Down
2 changes: 2 additions & 0 deletions src/LineString.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public function pointN(int $n) : Point
/**
* Returns the points that compose this LineString.
*
* @psalm-return list<Point>
*
* @return Point[]
*/
public function points() : array
Expand Down
2 changes: 2 additions & 0 deletions src/PolyhedralSurface.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public function patchN(int $n) : Polygon
/**
* Returns the patches that compose this PolyhedralSurface.
*
* @psalm-return list<Polygon>
*
* @return Polygon[]
*/
public function patches() : array
Expand Down

0 comments on commit 3a7f757

Please sign in to comment.