Skip to content

Commit

Permalink
CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed May 27, 2023
1 parent 8c38dde commit 4fefe2c
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/BritishNationalGridPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ class BritishNationalGridPoint extends ProjectedPoint
{
private const GRID_LETTERS = 'VWXYZQRSTULMNOPFGHJKABCDE';

public function __construct(Length $easting, Length $northing, ?DateTimeInterface $epoch = null)
public function __construct(Length $easting, Length $northing, DateTimeInterface $epoch = null)
{
parent::__construct(Projected::fromSRID(Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID), $easting, $northing, null, null, $epoch, null);
}

/**
* @param string $reference OS grid reference (e.g. "TG514131")
*/
public static function fromGridReference(string $reference, ?DateTimeInterface $epoch = null): self
public static function fromGridReference(string $reference, DateTimeInterface $epoch = null): self
{
$reference = str_replace(' ', '', $reference);

Expand Down
4 changes: 2 additions & 2 deletions src/CompoundPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CompoundPoint extends Point implements ConvertiblePoint
*/
protected ?DateTimeImmutable $epoch;

protected function __construct(Compound $crs, GeographicPoint|ProjectedPoint $horizontalPoint, VerticalPoint $verticalPoint, ?DateTimeInterface $epoch = null)
protected function __construct(Compound $crs, GeographicPoint|ProjectedPoint $horizontalPoint, VerticalPoint $verticalPoint, DateTimeInterface $epoch = null)
{
$this->horizontalPoint = $horizontalPoint;
$this->verticalPoint = $verticalPoint;
Expand All @@ -76,7 +76,7 @@ protected function __construct(Compound $crs, GeographicPoint|ProjectedPoint $ho
$this->epoch = $epoch;
}

public static function create(Compound $crs, GeographicPoint|ProjectedPoint $horizontalPoint, VerticalPoint $verticalPoint, ?DateTimeInterface $epoch = null): self
public static function create(Compound $crs, GeographicPoint|ProjectedPoint $horizontalPoint, VerticalPoint $verticalPoint, DateTimeInterface $epoch = null): self
{
return new self($crs, $horizontalPoint, $verticalPoint, $epoch);
}
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geographic2D.php
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,7 @@ public static function getSupportedSRIDsWithHelp(): array
return array_map(fn (array $data) => ['name' => $data['name'], 'extent_description' => $data['extent_description'], 'help' => $data['help']], static::$sridData);
}

public static function registerCustomCRS(string $srid, string $name, string $coordinateSystemSrid, string $datumSrid, BoundingArea $extent, ?string $baseCRSSrid = null, string $help = ''): void
public static function registerCustomCRS(string $srid, string $name, string $coordinateSystemSrid, string $datumSrid, BoundingArea $extent, string $baseCRSSrid = null, string $help = ''): void
{
self::$sridData[$srid] = ['name' => $name, 'coordinate_system' => $coordinateSystemSrid, 'datum' => $datumSrid, 'extent' => $extent, 'extent_description' => '', 'base_crs' => $baseCRSSrid, 'help' => $help];
}
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Geographic3D.php
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ public static function getSupportedSRIDsWithHelp(): array
return array_map(fn (array $data) => ['name' => $data['name'], 'extent_description' => $data['extent_description'], 'help' => $data['help']], static::$sridData);
}

public static function registerCustomCRS(string $srid, string $name, string $coordinateSystemSrid, string $datumSrid, BoundingArea $extent, ?string $baseCRSSrid = null, string $help = ''): void
public static function registerCustomCRS(string $srid, string $name, string $coordinateSystemSrid, string $datumSrid, BoundingArea $extent, string $baseCRSSrid = null, string $help = ''): void
{
self::$sridData[$srid] = ['name' => $name, 'coordinate_system' => $coordinateSystemSrid, 'datum' => $datumSrid, 'extent' => $extent, 'extent_description' => '', 'base_crs' => $baseCRSSrid, 'help' => $help];
}
Expand Down
2 changes: 1 addition & 1 deletion src/CoordinateReferenceSystem/Projected.php
Original file line number Diff line number Diff line change
Expand Up @@ -40299,7 +40299,7 @@ public function __construct(
BoundingArea $boundingArea,
string $name = '',
Geographic2D|Geographic3D $baseCRS = null,
?string $derivingConversion = null
string $derivingConversion = null
) {
$this->srid = $srid;
$this->coordinateSystem = $coordinateSystem;
Expand Down
4 changes: 2 additions & 2 deletions src/EPSG/Import/Codegen.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public function csFixFile(string $fileName): void

foreach ($fixers as $fixer) {
if (
!$fixer instanceof AbstractFixer &&
(!$fixer->supports($file) || !$fixer->isCandidate($tokens))
!$fixer instanceof AbstractFixer
&& (!$fixer->supports($file) || !$fixer->isCandidate($tokens))
) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/EPSG/Import/EPSGCodegenFromDataImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -1751,8 +1751,8 @@ public function generateDataCoordinateOperations(): void
$paramsRow['value'] = 'urn:ogc:def:coordinateOperation:EPSG::' . $paramsRow['value'];
}
if (
isset($filenameToProviderMap[(string) $paramsRow['value']]) &&
in_array(
isset($filenameToProviderMap[(string) $paramsRow['value']])
&& in_array(
$paramsRow['name'],
[
'eastingAndNorthingDifferenceFile',
Expand Down
4 changes: 2 additions & 2 deletions src/GeocentricPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GeocentricPoint extends Point implements ConvertiblePoint
*/
protected ?DateTimeImmutable $epoch;

protected function __construct(Geocentric $crs, Length $x, Length $y, Length $z, ?DateTimeInterface $epoch = null)
protected function __construct(Geocentric $crs, Length $x, Length $y, Length $z, DateTimeInterface $epoch = null)
{
$this->crs = $crs;
$this->x = $x::convert($x, $this->crs->getCoordinateSystem()->getAxisByName(Axis::GEOCENTRIC_X)->getUnitOfMeasureId());
Expand All @@ -85,7 +85,7 @@ protected function __construct(Geocentric $crs, Length $x, Length $y, Length $z,
* @param Length $y refer to CRS for preferred unit of measure, but any length unit accepted
* @param Length $z refer to CRS for preferred unit of measure, but any length unit accepted
*/
public static function create(Geocentric $crs, Length $x, Length $y, Length $z, ?DateTimeInterface $epoch = null): self
public static function create(Geocentric $crs, Length $x, Length $y, Length $z, DateTimeInterface $epoch = null): self
{
return new self($crs, $x, $y, $z, $epoch);
}
Expand Down
2 changes: 1 addition & 1 deletion src/GeographicPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function __construct(Geographic2D|Geographic3D $crs, Angle $latitude,
* @param Angle $latitude refer to CRS for preferred unit of measure, but any angle unit accepted
* @param Angle $longitude refer to CRS for preferred unit of measure, but any angle unit accepted
*/
public static function create(Geographic2D|Geographic3D $crs, Angle $latitude, Angle $longitude, ?Length $height = null, ?DateTimeInterface $epoch = null): self
public static function create(Geographic2D|Geographic3D $crs, Angle $latitude, Angle $longitude, Length $height = null, DateTimeInterface $epoch = null): self
{
return new self($crs, $latitude, $longitude, $height, $epoch);
}
Expand Down
4 changes: 2 additions & 2 deletions src/IrishGridPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ class IrishGridPoint extends ProjectedPoint
{
private const GRID_LETTERS = 'VWXYZQRSTULMNOPFGHJKABCDE';

public function __construct(Length $easting, Length $northing, ?DateTimeInterface $epoch = null)
public function __construct(Length $easting, Length $northing, DateTimeInterface $epoch = null)
{
parent::__construct(Projected::fromSRID(Projected::EPSG_TM75_IRISH_GRID), $easting, $northing, null, null, $epoch, null);
}

/**
* @param string $reference Irish grid reference (e.g. "T514131")
*/
public static function fromGridReference(string $reference, ?DateTimeInterface $epoch = null): self
public static function fromGridReference(string $reference, DateTimeInterface $epoch = null): self
{
$reference = str_replace(' ', '', $reference);

Expand Down
2 changes: 1 addition & 1 deletion src/IrishTransverseMercatorPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class IrishTransverseMercatorPoint extends ProjectedPoint
{
public function __construct(Length $easting, Length $northing, ?DateTimeInterface $epoch = null)
public function __construct(Length $easting, Length $northing, DateTimeInterface $epoch = null)
{
parent::__construct(Projected::fromSRID(Projected::EPSG_IRENET95_IRISH_TRANSVERSE_MERCATOR), $easting, $northing, null, null, $epoch, null);
}
Expand Down
12 changes: 6 additions & 6 deletions src/ProjectedPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function __construct(Projected $crs, ?Length $easting, ?Length $northi
$this->height = $height;
}

public static function create(Projected $crs, ?Length $easting, ?Length $northing, ?Length $westing, ?Length $southing, ?DateTimeInterface $epoch = null, ?Length $height = null): self
public static function create(Projected $crs, ?Length $easting, ?Length $northing, ?Length $westing, ?Length $southing, DateTimeInterface $epoch = null, Length $height = null): self
{
return match ($crs->getSRID()) {
Projected::EPSG_OSGB36_BRITISH_NATIONAL_GRID => new BritishNationalGridPoint($easting, $northing, $epoch),
Expand All @@ -160,17 +160,17 @@ public static function create(Projected $crs, ?Length $easting, ?Length $northin
};
}

public static function createFromEastingNorthing(Projected $crs, Length $easting, Length $northing, ?DateTimeInterface $epoch = null, ?Length $height = null): self
public static function createFromEastingNorthing(Projected $crs, Length $easting, Length $northing, DateTimeInterface $epoch = null, Length $height = null): self
{
return static::create($crs, $easting, $northing, null, null, $epoch, $height);
}

public static function createFromWestingNorthing(Projected $crs, Length $westing, Length $northing, ?DateTimeInterface $epoch = null, ?Length $height = null): self
public static function createFromWestingNorthing(Projected $crs, Length $westing, Length $northing, DateTimeInterface $epoch = null, Length $height = null): self
{
return static::create($crs, null, $northing, $westing, null, $epoch, $height);
}

public static function createFromWestingSouthing(Projected $crs, Length $westing, Length $southing, ?DateTimeInterface $epoch = null, ?Length $height = null): self
public static function createFromWestingSouthing(Projected $crs, Length $westing, Length $southing, DateTimeInterface $epoch = null, Length $height = null): self
{
return static::create($crs, null, null, $westing, $southing, $epoch, $height);
}
Expand Down Expand Up @@ -2142,8 +2142,8 @@ public function complexPolynomial(
Scale $A4,
Scale $A5,
Scale $A6,
?Scale $A7 = null,
?Scale $A8 = null
Scale $A7 = null,
Scale $A8 = null
): self {
$xs = $this->easting->getValue();
$ys = $this->northing->getValue();
Expand Down
2 changes: 1 addition & 1 deletion src/UTMPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UTMPoint extends ProjectedPoint
*/
protected Geographic2D|Geographic3D $baseCRS;

public function __construct(Geographic2D|Geographic3D $crs, Length $easting, Length $northing, int $zone, string $hemisphere, ?DateTimeInterface $epoch = null)
public function __construct(Geographic2D|Geographic3D $crs, Length $easting, Length $northing, int $zone, string $hemisphere, DateTimeInterface $epoch = null)
{
$this->zone = $zone;
$this->hemisphere = $hemisphere;
Expand Down
4 changes: 2 additions & 2 deletions src/VerticalPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class VerticalPoint extends Point
* Constructor.
* @param Length $height refer to CRS for preferred unit of measure, but any length unit accepted
*/
protected function __construct(Vertical $crs, Length $height, ?DateTimeInterface $epoch = null)
protected function __construct(Vertical $crs, Length $height, DateTimeInterface $epoch = null)
{
$this->height = $height::convert($height, $crs->getCoordinateSystem()->getAxes()[0]->getUnitOfMeasureId());
$this->crs = $crs;
Expand All @@ -62,7 +62,7 @@ protected function __construct(Vertical $crs, Length $height, ?DateTimeInterface
* Constructor.
* @param Length $height refer to CRS for preferred unit of measure, but any length unit accepted
*/
public static function create(Vertical $crs, Length $height, ?DateTimeInterface $epoch = null): self
public static function create(Vertical $crs, Length $height, DateTimeInterface $epoch = null): self
{
return new self($crs, $height, $epoch);
}
Expand Down

0 comments on commit 4fefe2c

Please sign in to comment.