Skip to content

Commit

Permalink
Fix getIterator() deprecation on PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Nov 6, 2021
1 parent 5d77407 commit 3f61228
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/CircularString.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, Point>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->points);
}
Expand Down
2 changes: 1 addition & 1 deletion src/CompoundCurve.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, Curve>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->curves);
}
Expand Down
2 changes: 1 addition & 1 deletion src/CurvePolygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, Curve>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->rings);
}
Expand Down
2 changes: 1 addition & 1 deletion src/GeometryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, T>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->geometries);
}
Expand Down
2 changes: 1 addition & 1 deletion src/LineString.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, Point>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->points);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, float>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->toArray());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Polygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, LineString>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->rings);
}
Expand Down
2 changes: 1 addition & 1 deletion src/PolyhedralSurface.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function count() : int
*
* @psalm-return ArrayIterator<int, Polygon>
*/
public function getIterator()
public function getIterator() : ArrayIterator
{
return new ArrayIterator($this->patches);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/CircularStringProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/CompoundCurveProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/CurvePolygonProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/GeometryCollectionProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/LineStringProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/MultiCurveProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/MultiLineStringProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/MultiPointProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/MultiPolygonProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/MultiSurfaceProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/PointProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/PolygonProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/PolyhedralSurfaceProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/TINProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down
2 changes: 1 addition & 1 deletion src/Proxy/TriangleProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function count() : int
return $this->proxyGeometry->count();
}

public function getIterator()
public function getIterator() : \ArrayIterator
{
if ($this->proxyGeometry === null) {
$this->load();
Expand Down

0 comments on commit 3f61228

Please sign in to comment.