@@ -14,6 +14,6 @@ |
||
14 | 14 | { |
15 | 15 | public function __construct(string $srid) |
16 | 16 | { |
17 | - parent::__construct('Unknown SRID: ' . $srid); |
|
17 | + parent::__construct('Unknown SRID: '.$srid); |
|
18 | 18 | } |
19 | 19 | } |
@@ -20,10 +20,10 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct(array $allowedAxes) |
22 | 22 | { |
23 | - $axisNames = array_map(static function ($allowedAxis) { |
|
23 | + $axisNames = array_map(static function($allowedAxis) { |
|
24 | 24 | return $allowedAxis->getName(); |
25 | 25 | }, $allowedAxes); |
26 | 26 | |
27 | - parent::__construct('This CRS has axes: ' . implode(', ', $axisNames)); |
|
27 | + parent::__construct('This CRS has axes: '.implode(', ', $axisNames)); |
|
28 | 28 | } |
29 | 29 | } |
@@ -172,7 +172,7 @@ |
||
172 | 172 | $minorLetter = substr(self::GRID_LETTERS, $minorLetterIndex, 1); |
173 | 173 | |
174 | 174 | return [ |
175 | - $majorLetter . $minorLetter, |
|
175 | + $majorLetter.$minorLetter, |
|
176 | 176 | substr($easting, 1, $halfLength), |
177 | 177 | substr($northing, 1, $halfLength), |
178 | 178 | ]; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $yearPortion = $this->time - $year; |
42 | 42 | $days = round($yearPortion * 365.25); |
43 | 43 | |
44 | - return DateTimeImmutable::createFromFormat('Yz', $year . $days); |
|
44 | + return DateTimeImmutable::createFromFormat('Yz', $year.$days); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getValue(): float |
@@ -172,7 +172,7 @@ |
||
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
175 | - return '(' . implode(', ', $values) . ')'; |
|
175 | + return '('.implode(', ', $values).')'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -127,7 +127,7 @@ |
||
127 | 127 | |
128 | 128 | public function getUnitName(): string |
129 | 129 | { |
130 | - return $this->change->getUnitName() . ' per ' . $this->time->getUnitName(); |
|
130 | + return $this->change->getUnitName().' per '.$this->time->getUnitName(); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | public function __toString(): string |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | } |
219 | 219 | |
220 | - return '(' . implode(', ', $values) . ')'; |
|
220 | + return '('.implode(', ', $values).')'; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -2071,7 +2071,7 @@ discard block |
||
2071 | 2071 | $longitudeOrigin = $initialLongitude->add(new Degree($Z * 6 - 3)); |
2072 | 2072 | |
2073 | 2073 | $projectedCRS = new Projected( |
2074 | - 'UTM/' . $this->crs->getSRID(), |
|
2074 | + 'UTM/'.$this->crs->getSRID(), |
|
2075 | 2075 | Cartesian::fromSRID(Cartesian::EPSG_2D_AXES_EASTING_NORTHING_E_N_ORIENTATIONS_EAST_NORTH_UOM_M), |
2076 | 2076 | $this->crs->getDatum(), |
2077 | 2077 | BoundingArea::createWorld() // this is a dummy CRS for the transform only, details don't matter |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | $projectedCRS = new Projected( |
57 | - 'UTM/' . $crs->getSRID(), |
|
57 | + 'UTM/'.$crs->getSRID(), |
|
58 | 58 | Cartesian::fromSRID(Cartesian::EPSG_2D_AXES_EASTING_NORTHING_E_N_ORIENTATIONS_EAST_NORTH_UOM_M), |
59 | 59 | $crs->getDatum(), |
60 | 60 | $boundingArea |
@@ -106,6 +106,6 @@ discard block |
||
106 | 106 | |
107 | 107 | public function __toString(): string |
108 | 108 | { |
109 | - return $this->getZone() . $this->getHemisphere() . ' ' . (int) $this->easting->getValue() . ' ' . (int) $this->northing->getValue(); |
|
109 | + return $this->getZone().$this->getHemisphere().' '.(int) $this->easting->getValue().' '.(int) $this->northing->getValue(); |
|
110 | 110 | } |
111 | 111 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | // Try simple direct match before doing anything more complex! |
78 | 78 | $candidatePaths = $this->buildDirectTransformationPathsToCRS($source, $target); |
79 | 79 | |
80 | - usort($candidatePaths, static function (array $a, array $b) { |
|
80 | + usort($candidatePaths, static function(array $a, array $b) { |
|
81 | 81 | return count($a['path']) <=> count($b['path']) ?: $a['accuracy'] <=> $b['accuracy']; |
82 | 82 | }); |
83 | 83 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | // Otherwise, recursively calculate permutations of intermediate CRSs |
91 | 91 | $candidatePaths = $this->buildIndirectTransformationPathsToCRS($source, $target); |
92 | 92 | |
93 | - usort($candidatePaths, static function (array $a, array $b) { |
|
93 | + usort($candidatePaths, static function(array $a, array $b) { |
|
94 | 94 | return count($a['path']) <=> count($b['path']) ?: $a['accuracy'] <=> $b['accuracy']; |
95 | 95 | }); |
96 | 96 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | protected function buildDirectTransformationPathsToCRS(CoordinateReferenceSystem $source, CoordinateReferenceSystem $target): array |
164 | 164 | { |
165 | - $cacheKey = $source->getSRID() . '|' . $target->getSRID(); |
|
165 | + $cacheKey = $source->getSRID().'|'.$target->getSRID(); |
|
166 | 166 | if (!isset(self::$directTransformationPathCache[$cacheKey])) { |
167 | 167 | $simplePaths = [[$source->getSRID(), $target->getSRID()]]; |
168 | 168 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | protected function buildIndirectTransformationPathsToCRS(CoordinateReferenceSystem $source, CoordinateReferenceSystem $target): array |
187 | 187 | { |
188 | - $cacheKey = $source->getSRID() . '|' . $target->getSRID(); |
|
188 | + $cacheKey = $source->getSRID().'|'.$target->getSRID(); |
|
189 | 189 | if (!isset(self::$indirectTransformationPathCache[$cacheKey])) { |
190 | 190 | $simplePaths = []; |
191 | 191 | $visited = []; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | do { |
240 | 240 | $to = array_shift($simplePath); |
241 | 241 | $wipTransformationsInPath = []; |
242 | - foreach (static::$transformationsByCRSPair[$from . '|' . $to] ?? [] as $transformation) { |
|
242 | + foreach (static::$transformationsByCRSPair[$from.'|'.$to] ?? [] as $transformation) { |
|
243 | 243 | foreach ($transformationsToMakePath as $transformationToMakePath) { |
244 | 244 | $wipTransformationsInPath[] = array_merge($transformationToMakePath, [$transformation]); |
245 | 245 | } |
@@ -319,13 +319,13 @@ discard block |
||
319 | 319 | { |
320 | 320 | if (!static::$transformationsByCRSPair) { |
321 | 321 | foreach (CRSTransformations::getSupportedTransformations() as $key => $transformation) { |
322 | - if (!isset(static::$transformationsByCRSPair[$transformation['source_crs'] . '|' . $transformation['target_crs']][$key])) { |
|
323 | - static::$transformationsByCRSPair[$transformation['source_crs'] . '|' . $transformation['target_crs']][$key] = $transformation; |
|
324 | - static::$transformationsByCRSPair[$transformation['source_crs'] . '|' . $transformation['target_crs']][$key]['in_reverse'] = false; |
|
322 | + if (!isset(static::$transformationsByCRSPair[$transformation['source_crs'].'|'.$transformation['target_crs']][$key])) { |
|
323 | + static::$transformationsByCRSPair[$transformation['source_crs'].'|'.$transformation['target_crs']][$key] = $transformation; |
|
324 | + static::$transformationsByCRSPair[$transformation['source_crs'].'|'.$transformation['target_crs']][$key]['in_reverse'] = false; |
|
325 | 325 | } |
326 | - if ($transformation['reversible'] && !isset(static::$transformationsByCRSPair[$transformation['target_crs'] . '|' . $transformation['source_crs']][$key])) { |
|
327 | - static::$transformationsByCRSPair[$transformation['target_crs'] . '|' . $transformation['source_crs']][$key] = $transformation; |
|
328 | - static::$transformationsByCRSPair[$transformation['target_crs'] . '|' . $transformation['source_crs']][$key]['in_reverse'] = true; |
|
326 | + if ($transformation['reversible'] && !isset(static::$transformationsByCRSPair[$transformation['target_crs'].'|'.$transformation['source_crs']][$key])) { |
|
327 | + static::$transformationsByCRSPair[$transformation['target_crs'].'|'.$transformation['source_crs']][$key] = $transformation; |
|
328 | + static::$transformationsByCRSPair[$transformation['target_crs'].'|'.$transformation['source_crs']][$key]['in_reverse'] = true; |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 | } |