Skip to content

Commit

Permalink
PHP 7.3 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Jan 4, 2021
1 parent a64886d commit 414ad0a
Show file tree
Hide file tree
Showing 68 changed files with 115 additions and 114 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
php-version:
- "8.0"
- "7.4"
- "7.3"

dependencies:
- highest
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"license": "(MIT and proprietary)",
"require": {
"php": "^7.4||^8.0",
"php": "^7.3||^8.0",
"symfony/polyfill-php80": "^1.18"
},
"require-dev": {
Expand Down
8 changes: 4 additions & 4 deletions src/CompoundPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ class CompoundPoint extends Point
* Horizontal point.
* @var GeographicPoint|ProjectedPoint
*/
protected Point $horizontalPoint;
protected $horizontalPoint;

/**
* Vertical point.
*/
protected VerticalPoint $verticalPoint;
protected $verticalPoint;

/**
* Coordinate reference system.
*/
protected Compound $crs;
protected $crs;

/**
* Coordinate epoch (date for which the specified coordinates represented this point).
*/
protected ?DateTimeImmutable $epoch;
protected $epoch;

/**
* Constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateOperation/CRSTransformations.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class CRSTransformations
{
protected static array $sridData = [
protected static $sridData = [
[
'operation' => 'urn:ogc:def:coordinateOperation:EPSG::5166',
'name' => 'ED50 / UTM zone 31N to ETRS89 / UTM zone 31N (1)',
Expand Down
4 changes: 2 additions & 2 deletions src/CoordinateOperation/ComplexNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/
class ComplexNumber
{
private float $real;
private $real;

private float $imaginary;
private $imaginary;

public function __construct(float $real, float $imaginary)
{
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateOperation/CoordinateOperationParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class CoordinateOperationParams
{
protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:coordinateOperation:EPSG::1024' => [
'X-axis translation' => [
'value' => 601.705,
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateOperation/CoordinateOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class CoordinateOperations
{
protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:coordinateOperation:EPSG::1024' => [
'name' => 'MGI to ETRS89 (4)',
'method' => 'urn:ogc:def:method:EPSG::9607',
Expand Down
8 changes: 4 additions & 4 deletions src/CoordinateOperation/GeocentricValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class GeocentricValue
{
protected const NEWTON_RAPHSON_CONVERGENCE = 1e-16;

private Metre$x;
private $x;

private Metre $y;
private $y;

private Metre $z;
private $z;

private Datum $datum;
private $datum;

public function __construct(Length $x, Length $y, Length $z, Datum $datum)
{
Expand Down
8 changes: 4 additions & 4 deletions src/CoordinateOperation/GeographicValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
*/
class GeographicValue
{
private Radian $latitude;
private $latitude;

private Radian $longitude;
private $longitude;

private ?Metre $height;
private $height;

private Datum $datum;
private $datum;

public function __construct(Angle $latitude, Angle $longitude, ?Length $height, Datum $datum)
{
Expand Down
6 changes: 3 additions & 3 deletions src/CoordinateReferenceSystem/Compound.php
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,7 @@ class Compound extends CoordinateReferenceSystem
*/
public const EPSG_WGS_84_WORLD_MERCATOR_PLUS_EGM2008_HEIGHT = 'urn:ogc:def:crs:EPSG::6893';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::3901' => [
'name' => 'KKJ / Finland Uniform Coordinate System + N60 height',
'horizontal_crs' => 'urn:ogc:def:crs:EPSG::2393',
Expand Down Expand Up @@ -3907,9 +3907,9 @@ class Compound extends CoordinateReferenceSystem
/**
* @var Geocentric|Geographic|Projected
*/
private CoordinateReferenceSystem $horizontal;
private $horizontal;

private Vertical $vertical;
private $vertical;

/**
* Compound constructor.
Expand Down
8 changes: 4 additions & 4 deletions src/CoordinateReferenceSystem/CoordinateReferenceSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ abstract class CoordinateReferenceSystem

public const CRS_SRID_PREFIX_EPSG = 'urn:ogc:def:crs:EPSG::';

protected string $srid;
protected $srid;

protected CoordinateSystem $coordinateSystem;
protected $coordinateSystem;

protected Datum $datum;
protected $datum;

public function getSRID(): string
{
Expand All @@ -62,7 +62,7 @@ public function getDatum(): Datum
return $this->datum;
}

public static function fromSRID(string $srid): self
public static function fromSRID(string $srid)
{
if (isset(Projected::getSupportedSRIDs()[$srid])) {
return Projected::fromSRID($srid);
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geocentric.php
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ class Geocentric extends CoordinateReferenceSystem
*/
public const EPSG_YEMEN_NGN96 = 'urn:ogc:def:crs:EPSG::4980';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::3822' => [
'name' => 'TWD97',
'coordinate_system' => 'urn:ogc:def:cs:EPSG::6500',
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geographic.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

abstract class Geographic extends CoordinateReferenceSystem
{
public static function fromSRID(string $srid): self
public static function fromSRID(string $srid)
{
if (isset(Geographic2D::getSupportedSRIDs()[$srid])) {
return Geographic2D::fromSRID($srid);
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geographic2D.php
Original file line number Diff line number Diff line change
Expand Up @@ -3864,7 +3864,7 @@ class Geographic2D extends Geographic
*/
public const EPSG_FK89 = 'urn:ogc:def:crs:EPSG::4753';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::3819' => [
'name' => 'HD1909',
'coordinate_system' => 'urn:ogc:def:cs:EPSG::6422',
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geographic3D.php
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ class Geographic3D extends Geographic
*/
public const EPSG_YEMEN_NGN96 = 'urn:ogc:def:crs:EPSG::4981';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::3823' => [
'name' => 'TWD97',
'coordinate_system' => 'urn:ogc:def:cs:EPSG::6423',
Expand Down
4 changes: 2 additions & 2 deletions src/CoordinateReferenceSystem/Projected.php
Original file line number Diff line number Diff line change
Expand Up @@ -36757,9 +36757,9 @@ class Projected extends CoordinateReferenceSystem

use ProjectedSRIDData;

protected ?CoordinateReferenceSystem $baseCRS;
protected $baseCRS;

protected ?string $baseCRSConversionOperation;
protected $baseCRSConversionOperation;

public function __construct(
string $srid,
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/ProjectedSRIDData.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
trait ProjectedSRIDData
{
protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::2000' => [
'name' => 'Anguilla 1957 / British West Indies Grid',
'coordinate_system' => 'urn:ogc:def:cs:EPSG::4400',
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Vertical.php
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ class Vertical extends CoordinateReferenceSystem
*/
public const EPSG_YELLOW_SEA_1985_HEIGHT = 'urn:ogc:def:crs:EPSG::5737';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:crs:EPSG::3855' => [
'name' => 'EGM2008 height',
'coordinate_system' => 'urn:ogc:def:cs:EPSG::6499',
Expand Down
8 changes: 4 additions & 4 deletions src/CoordinateSystem/Axis.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class Axis

public const WESTING = 'Westing';

private string $orientation;
private $orientation;

private string $abbreviation;
private $abbreviation;

private string $name;
private $name;

private string $unitOfMeasureId;
private $unitOfMeasureId;

public function __construct(
string $orientation,
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateSystem/Cartesian.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ class Cartesian extends CoordinateSystem
*/
public const EPSG_AXES_WESTING_SOUTHING_Y_X_ORIENTATIONS_WEST_SOUTH_UOM_M = 'urn:ogc:def:cs:EPSG::6503';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:cs:EPSG::1024' => [
'name' => '. Axes: easting, northing (M,P). Orientations east, north. UoM m.',
'axes' => [
Expand Down
4 changes: 2 additions & 2 deletions src/CoordinateSystem/CoordinateSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ abstract class CoordinateSystem

public const CS_TYPE_VERTICAL = 'vertical';

protected string $srid;
protected $srid;

/**
* @var Axis[]
*/
protected array $axes;
protected $axes;

public function __construct(
string $srid,
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateSystem/Ellipsoidal.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Ellipsoidal extends CoordinateSystem
*/
public const EPSG_AXES_LONGITUDE_LATITUDE_ORIENTATIONS_EAST_NORTH_UOM_DEGREE = 'urn:ogc:def:cs:EPSG::6424';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:cs:EPSG::6403' => [
'name' => '. Axes: latitude, longitude. Orientations: north, east. UoM: grads.',
'axes' => [
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateSystem/Vertical.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Vertical extends CoordinateSystem
*/
public const EPSG_AXIS_HEIGHT_H_ORIENTATION_UP_UOM_M = 'urn:ogc:def:cs:EPSG::6499';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:cs:EPSG::1030' => [
'name' => '. Axis: height (H). Orientation: up. UoM: ft.',
'axes' => [
Expand Down
10 changes: 5 additions & 5 deletions src/Datum/Datum.php
Original file line number Diff line number Diff line change
Expand Up @@ -7466,7 +7466,7 @@ class Datum
*/
public const EPSG_FK89 = 'urn:ogc:def:datum:EPSG::6753';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:datum:EPSG::1024' => [
'name' => 'Hungarian Datum 1909',
'type' => 'geodetic',
Expand Down Expand Up @@ -13729,13 +13729,13 @@ class Datum

public const DATUM_TYPE_ENSEMBLE = 'ensemble';

protected string $datumType;
protected $datumType;

protected ?Ellipsoid $ellipsoid;
protected $ellipsoid;

protected ?PrimeMeridian $primeMeridian;
protected $primeMeridian;

protected ?float $frameReferenceEpoch;
protected $frameReferenceEpoch;

public function __construct(
string $datumType,
Expand Down
6 changes: 3 additions & 3 deletions src/Datum/Ellipsoid.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class Ellipsoid
*/
public const EPSG_ZACH_1812 = 'urn:ogc:def:ellipsoid:EPSG::1026';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:ellipsoid:EPSG::1024' => [
'name' => 'CGCS2000',
'semi_major_axis' => 6378137.0,
Expand Down Expand Up @@ -656,9 +656,9 @@ class Ellipsoid
],
];

protected Length $semiMajorAxis;
protected $semiMajorAxis;

protected Length $semiMinorAxis;
protected $semiMinorAxis;

public function __construct(Length $semiMajorAxis, Length $semiMinorAxis)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Datum/PrimeMeridian.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class PrimeMeridian
*/
public const EPSG_STOCKHOLM = 'urn:ogc:def:meridian:EPSG::8911';

protected static array $sridData = [
protected static $sridData = [
'urn:ogc:def:meridian:EPSG::8901' => [
'name' => 'Greenwich',
'greenwich_longitude' => 0.0,
Expand Down Expand Up @@ -170,9 +170,9 @@ class PrimeMeridian
],
];

private string $name;
private $name;

private Angle $greenwichLongitude;
private $greenwichLongitude;

public function __construct(string $name, Angle $greenwichLongitude)
{
Expand Down
4 changes: 2 additions & 2 deletions src/EPSG/Import/AddNewConstantsVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

class AddNewConstantsVisitor extends NodeVisitorAbstract
{
private array $constants;
private $constants;

private string $visibility;
private $visibility;

public function __construct(array $constants, string $visibility)
{
Expand Down
2 changes: 1 addition & 1 deletion src/EPSG/Import/AddNewDataVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class AddNewDataVisitor extends NodeVisitorAbstract
{
private array $data;
private $data;

public function __construct(array $data)
{
Expand Down
4 changes: 2 additions & 2 deletions src/EPSG/Import/EPSGImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

class EPSGImporter
{
private string $resourceDir;
private $resourceDir;

private string $sourceDir;
private $sourceDir;

private const BOM = "\xEF\xBB\xBF";

Expand Down
Loading

0 comments on commit 414ad0a

Please sign in to comment.