@@ -180,6 +180,6 @@ |
||
| 180 | 180 | |
| 181 | 181 | public static function getSupportedSRIDs(): array |
| 182 | 182 | { |
| 183 | - return array_map(function ($sridData) {return $sridData['name']; }, static::$sridData); |
|
| 183 | + return array_map(function($sridData) {return $sridData['name']; }, static::$sridData); |
|
| 184 | 184 | } |
| 185 | 185 | } |
@@ -18,21 +18,21 @@ |
||
| 18 | 18 | { |
| 19 | 19 | protected function pExpr_Array(Array_ $node) |
| 20 | 20 | { |
| 21 | - return '[' . $this->pCommaSeparatedMultiline($node->items, true) . $this->nl . ']'; |
|
| 21 | + return '['.$this->pCommaSeparatedMultiline($node->items, true).$this->nl.']'; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | protected function pStmt_ClassConst(ClassConst $node): string |
| 25 | 25 | { |
| 26 | - return parent::pStmt_ClassConst($node) . "\n"; |
|
| 26 | + return parent::pStmt_ClassConst($node)."\n"; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | protected function pStmt_Property(Property $node): string |
| 30 | 30 | { |
| 31 | - return parent::pStmt_Property($node) . "\n"; |
|
| 31 | + return parent::pStmt_Property($node)."\n"; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | protected function pStmt_ClassMethod(ClassMethod $node): string |
| 35 | 35 | { |
| 36 | - return parent::pStmt_ClassMethod($node) . "\n"; |
|
| 36 | + return parent::pStmt_ClassMethod($node)."\n"; |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -36,32 +36,32 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function __construct() |
| 38 | 38 | { |
| 39 | - $this->resourceDir = __DIR__ . '/../../../resources'; |
|
| 39 | + $this->resourceDir = __DIR__.'/../../../resources'; |
|
| 40 | 40 | $this->sourceDir = dirname(__DIR__, 2); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function createSQLiteDB(): void |
| 44 | 44 | { |
| 45 | 45 | //remove old file if any |
| 46 | - if (file_exists($this->resourceDir . '/epsg/epsg.sqlite')) { |
|
| 47 | - unlink($this->resourceDir . '/epsg/epsg.sqlite'); |
|
| 46 | + if (file_exists($this->resourceDir.'/epsg/epsg.sqlite')) { |
|
| 47 | + unlink($this->resourceDir.'/epsg/epsg.sqlite'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | $sqlite = new SQLite3( |
| 51 | - $this->resourceDir . '/epsg/epsg.sqlite', |
|
| 51 | + $this->resourceDir.'/epsg/epsg.sqlite', |
|
| 52 | 52 | SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE |
| 53 | 53 | ); |
| 54 | 54 | |
| 55 | 55 | $sqlite->enableExceptions(true); |
| 56 | 56 | $sqlite->exec('PRAGMA journal_mode=WAL'); //WAL is faster |
| 57 | 57 | |
| 58 | - $tableSchema = file_get_contents($this->resourceDir . '/epsg/PostgreSQL_Table_Script.sql'); |
|
| 58 | + $tableSchema = file_get_contents($this->resourceDir.'/epsg/PostgreSQL_Table_Script.sql'); |
|
| 59 | 59 | if (strpos($tableSchema, self::BOM) === 0) { |
| 60 | 60 | $tableSchema = substr($tableSchema, 3); |
| 61 | 61 | } |
| 62 | 62 | $sqlite->exec($tableSchema); |
| 63 | 63 | |
| 64 | - $tableData = file_get_contents($this->resourceDir . '/epsg/PostgreSQL_Data_Script.sql'); |
|
| 64 | + $tableData = file_get_contents($this->resourceDir.'/epsg/PostgreSQL_Data_Script.sql'); |
|
| 65 | 65 | if (strpos($tableData, self::BOM) === 0) { |
| 66 | 66 | $tableData = substr($tableData, 3); |
| 67 | 67 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function doCodeGeneration(): void |
| 76 | 76 | { |
| 77 | 77 | $sqlite = new SQLite3( |
| 78 | - $this->resourceDir . '/epsg/epsg.sqlite', |
|
| 78 | + $this->resourceDir.'/epsg/epsg.sqlite', |
|
| 79 | 79 | SQLITE3_OPEN_READONLY |
| 80 | 80 | ); |
| 81 | 81 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $constants[] = $row; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/Angle/Angle.php', $constants, 'public'); |
|
| 123 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/Angle/Angle.php', $constants, 'public'); |
|
| 124 | 124 | |
| 125 | 125 | $sql = " |
| 126 | 126 | SELECT |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $constants[] = $row; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/Length/Length.php', $constants, 'public'); |
|
| 144 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/Length/Length.php', $constants, 'public'); |
|
| 145 | 145 | |
| 146 | 146 | $sql = " |
| 147 | 147 | SELECT |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $constants[] = $row; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/Scale/Scale.php', $constants, 'public'); |
|
| 165 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/Scale/Scale.php', $constants, 'public'); |
|
| 166 | 166 | |
| 167 | 167 | $sql = " |
| 168 | 168 | SELECT |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $constants[] = $row; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/Time/Time.php', $constants, 'public'); |
|
| 185 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/Time/Time.php', $constants, 'public'); |
|
| 186 | 186 | |
| 187 | 187 | $sql = " |
| 188 | 188 | SELECT |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $constants[] = $row; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/Rate.php', $constants, 'public'); |
|
| 205 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/Rate.php', $constants, 'public'); |
|
| 206 | 206 | |
| 207 | 207 | $sql = " |
| 208 | 208 | SELECT |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $constants[] = $row; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - $this->updateFileConstants($this->sourceDir . '/UnitOfMeasure/UnitOfMeasure.php', $constants, 'public'); |
|
| 225 | + $this->updateFileConstants($this->sourceDir.'/UnitOfMeasure/UnitOfMeasure.php', $constants, 'public'); |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | public function generateDataUnitsOfMeasure(SQLite3 $sqlite): void |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | unset($data[$row['urn']]['urn']); |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/Angle/Angle.php', $data); |
|
| 248 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/Angle/Angle.php', $data); |
|
| 249 | 249 | |
| 250 | 250 | $sql = " |
| 251 | 251 | SELECT |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | unset($data[$row['urn']]['urn']); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/Length/Length.php', $data); |
|
| 269 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/Length/Length.php', $data); |
|
| 270 | 270 | |
| 271 | 271 | $sql = " |
| 272 | 272 | SELECT |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | unset($data[$row['urn']]['urn']); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/Scale/Scale.php', $data); |
|
| 290 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/Scale/Scale.php', $data); |
|
| 291 | 291 | |
| 292 | 292 | $sql = " |
| 293 | 293 | SELECT |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | unset($data[$row['urn']]['urn']); |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/Time/Time.php', $data); |
|
| 310 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/Time/Time.php', $data); |
|
| 311 | 311 | |
| 312 | 312 | $sql = " |
| 313 | 313 | SELECT |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | unset($data[$row['urn']]['urn']); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/Rate.php', $data); |
|
| 330 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/Rate.php', $data); |
|
| 331 | 331 | |
| 332 | 332 | $sql = " |
| 333 | 333 | SELECT |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | unset($data[$row['urn']]['urn']); |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | - $this->updateFileData($this->sourceDir . '/UnitOfMeasure/UnitOfMeasureFactory.php', $data); |
|
| 350 | + $this->updateFileData($this->sourceDir.'/UnitOfMeasure/UnitOfMeasureFactory.php', $data); |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | public function generateConstantsPrimeMeridians(SQLite3 $sqlite): void |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | $constants[] = $row; |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | - $this->updateFileConstants($this->sourceDir . '/Datum/PrimeMeridian.php', $constants, 'public'); |
|
| 373 | + $this->updateFileConstants($this->sourceDir.'/Datum/PrimeMeridian.php', $constants, 'public'); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | public function generateDataPrimeMeridians(SQLite3 $sqlite): void |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | unset($data[$row['urn']]['urn']); |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - $this->updateFileData($this->sourceDir . '/Datum/PrimeMeridian.php', $data); |
|
| 397 | + $this->updateFileData($this->sourceDir.'/Datum/PrimeMeridian.php', $data); |
|
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | public function generateConstantsEllipsoids(SQLite3 $sqlite): void |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | $constants[] = $row; |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - $this->updateFileConstants($this->sourceDir . '/Datum/Ellipsoid.php', $constants, 'public'); |
|
| 422 | + $this->updateFileConstants($this->sourceDir.'/Datum/Ellipsoid.php', $constants, 'public'); |
|
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | public function generateDataEllipsoids(SQLite3 $sqlite): void |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | unset($data[$row['urn']]['inv_flattening']); |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | - $this->updateFileData($this->sourceDir . '/Datum/Ellipsoid.php', $data); |
|
| 453 | + $this->updateFileData($this->sourceDir.'/Datum/Ellipsoid.php', $data); |
|
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | public function generateConstantsDatums(SQLite3 $sqlite): void |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $constants[] = $row; |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | - $this->updateFileConstants($this->sourceDir . '/Datum/Datum.php', $constants, 'public'); |
|
| 479 | + $this->updateFileConstants($this->sourceDir.'/Datum/Datum.php', $constants, 'public'); |
|
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | public function generateDataDatums(SQLite3 $sqlite): void |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | unset($data[$row['urn']]['urn']); |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | - $this->updateFileData($this->sourceDir . '/Datum/Datum.php', $data); |
|
| 523 | + $this->updateFileData($this->sourceDir.'/Datum/Datum.php', $data); |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | public function generateConstantsCoordinateSystems(SQLite3 $sqlite): void |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | $constants[] = $row; |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | - $this->updateFileConstants($this->sourceDir . '/CoordinateSystem/Cartesian.php', $constants, 'public'); |
|
| 552 | + $this->updateFileConstants($this->sourceDir.'/CoordinateSystem/Cartesian.php', $constants, 'public'); |
|
| 553 | 553 | |
| 554 | 554 | /* |
| 555 | 555 | * ellipsoidal |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | $constants[] = $row; |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | - $this->updateFileConstants($this->sourceDir . '/CoordinateSystem/Ellipsoidal.php', $constants, 'public'); |
|
| 578 | + $this->updateFileConstants($this->sourceDir.'/CoordinateSystem/Ellipsoidal.php', $constants, 'public'); |
|
| 579 | 579 | |
| 580 | 580 | /* |
| 581 | 581 | * vertical |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | $constants[] = $row; |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | - $this->updateFileConstants($this->sourceDir . '/CoordinateSystem/Vertical.php', $constants, 'public'); |
|
| 604 | + $this->updateFileConstants($this->sourceDir.'/CoordinateSystem/Vertical.php', $constants, 'public'); |
|
| 605 | 605 | |
| 606 | 606 | /* |
| 607 | 607 | * other |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | $constants[] = $row; |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | - $this->updateFileConstants($this->sourceDir . '/CoordinateSystem/CoordinateSystem.php', $constants, 'public'); |
|
| 630 | + $this->updateFileConstants($this->sourceDir.'/CoordinateSystem/CoordinateSystem.php', $constants, 'public'); |
|
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | public function generateDataCoordinateSystems(SQLite3 $sqlite): void |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | unset($data[$row['urn']]['urn']); |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | - $this->updateFileData($this->sourceDir . '/CoordinateSystem/Cartesian.php', $data); |
|
| 675 | + $this->updateFileData($this->sourceDir.'/CoordinateSystem/Cartesian.php', $data); |
|
| 676 | 676 | |
| 677 | 677 | /* |
| 678 | 678 | * ellipsoidal |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | unset($data[$row['urn']]['urn']); |
| 715 | 715 | } |
| 716 | 716 | |
| 717 | - $this->updateFileData($this->sourceDir . '/CoordinateSystem/Ellipsoidal.php', $data); |
|
| 717 | + $this->updateFileData($this->sourceDir.'/CoordinateSystem/Ellipsoidal.php', $data); |
|
| 718 | 718 | |
| 719 | 719 | /* |
| 720 | 720 | * vertical |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | unset($data[$row['urn']]['urn']); |
| 757 | 757 | } |
| 758 | 758 | |
| 759 | - $this->updateFileData($this->sourceDir . '/CoordinateSystem/Vertical.php', $data); |
|
| 759 | + $this->updateFileData($this->sourceDir.'/CoordinateSystem/Vertical.php', $data); |
|
| 760 | 760 | |
| 761 | 761 | /* |
| 762 | 762 | * other |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | unset($data[$row['urn']]['urn']); |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | - $this->updateFileData($this->sourceDir . '/CoordinateSystem/CoordinateSystem.php', $data); |
|
| 802 | + $this->updateFileData($this->sourceDir.'/CoordinateSystem/CoordinateSystem.php', $data); |
|
| 803 | 803 | } |
| 804 | 804 | |
| 805 | 805 | public function generateConstantsCoordinateReferenceSystems(SQLite3 $sqlite): void |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | $constants[] = $row; |
| 832 | 832 | } |
| 833 | 833 | |
| 834 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Compound.php', $constants, 'public'); |
|
| 834 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Compound.php', $constants, 'public'); |
|
| 835 | 835 | |
| 836 | 836 | /* |
| 837 | 837 | * geocentric |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | $constants[] = $row; |
| 861 | 861 | } |
| 862 | 862 | |
| 863 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Geocentric.php', $constants, 'public'); |
|
| 863 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Geocentric.php', $constants, 'public'); |
|
| 864 | 864 | |
| 865 | 865 | /* |
| 866 | 866 | * geographic 2D |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | $constants[] = $row; |
| 890 | 890 | } |
| 891 | 891 | |
| 892 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Geographic2D.php', $constants, 'public'); |
|
| 892 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Geographic2D.php', $constants, 'public'); |
|
| 893 | 893 | |
| 894 | 894 | /* |
| 895 | 895 | * geographic 3D |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | $constants[] = $row; |
| 919 | 919 | } |
| 920 | 920 | |
| 921 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Geographic3D.php', $constants, 'public'); |
|
| 921 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Geographic3D.php', $constants, 'public'); |
|
| 922 | 922 | |
| 923 | 923 | /* |
| 924 | 924 | * projected |
@@ -948,7 +948,7 @@ discard block |
||
| 948 | 948 | $constants[] = $row; |
| 949 | 949 | } |
| 950 | 950 | |
| 951 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Projected.php', $constants, 'public'); |
|
| 951 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Projected.php', $constants, 'public'); |
|
| 952 | 952 | |
| 953 | 953 | /* |
| 954 | 954 | * vertical |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | $constants[] = $row; |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/Vertical.php', $constants, 'public'); |
|
| 980 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/Vertical.php', $constants, 'public'); |
|
| 981 | 981 | |
| 982 | 982 | /* |
| 983 | 983 | * other |
@@ -1006,7 +1006,7 @@ discard block |
||
| 1006 | 1006 | $constants[] = $row; |
| 1007 | 1007 | } |
| 1008 | 1008 | |
| 1009 | - $this->updateFileConstants($this->sourceDir . '/CoordinateReferenceSystem/CoordinateReferenceSystem.php', $constants, 'public'); |
|
| 1009 | + $this->updateFileConstants($this->sourceDir.'/CoordinateReferenceSystem/CoordinateReferenceSystem.php', $constants, 'public'); |
|
| 1010 | 1010 | } |
| 1011 | 1011 | |
| 1012 | 1012 | public function generateDataCoordinateReferenceSystems(SQLite3 $sqlite): void |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | unset($data[$row['urn']]['urn']); |
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Compound.php', $data); |
|
| 1041 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Compound.php', $data); |
|
| 1042 | 1042 | |
| 1043 | 1043 | /* |
| 1044 | 1044 | * geocentric |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | unset($data[$row['urn']]['urn']); |
| 1067 | 1067 | } |
| 1068 | 1068 | |
| 1069 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Geocentric.php', $data); |
|
| 1069 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Geocentric.php', $data); |
|
| 1070 | 1070 | |
| 1071 | 1071 | /* |
| 1072 | 1072 | * geographic 2D |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | unset($data[$row['urn']]['urn']); |
| 1095 | 1095 | } |
| 1096 | 1096 | |
| 1097 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Geographic2D.php', $data); |
|
| 1097 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Geographic2D.php', $data); |
|
| 1098 | 1098 | |
| 1099 | 1099 | /* |
| 1100 | 1100 | * geographic 3D |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | unset($data[$row['urn']]['urn']); |
| 1123 | 1123 | } |
| 1124 | 1124 | |
| 1125 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Geographic3D.php', $data); |
|
| 1125 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Geographic3D.php', $data); |
|
| 1126 | 1126 | |
| 1127 | 1127 | /* |
| 1128 | 1128 | * projected |
@@ -1150,7 +1150,7 @@ discard block |
||
| 1150 | 1150 | unset($data[$row['urn']]['urn']); |
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Projected.php', $data); |
|
| 1153 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Projected.php', $data); |
|
| 1154 | 1154 | |
| 1155 | 1155 | /* |
| 1156 | 1156 | * vertical |
@@ -1178,7 +1178,7 @@ discard block |
||
| 1178 | 1178 | unset($data[$row['urn']]['urn']); |
| 1179 | 1179 | } |
| 1180 | 1180 | |
| 1181 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/Vertical.php', $data); |
|
| 1181 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/Vertical.php', $data); |
|
| 1182 | 1182 | |
| 1183 | 1183 | /* |
| 1184 | 1184 | * other |
@@ -1207,7 +1207,7 @@ discard block |
||
| 1207 | 1207 | unset($data[$row['urn']]['urn']); |
| 1208 | 1208 | } |
| 1209 | 1209 | |
| 1210 | - $this->updateFileData($this->sourceDir . '/CoordinateReferenceSystem/CoordinateReferenceSystem.php', $data); |
|
| 1210 | + $this->updateFileData($this->sourceDir.'/CoordinateReferenceSystem/CoordinateReferenceSystem.php', $data); |
|
| 1211 | 1211 | } |
| 1212 | 1212 | |
| 1213 | 1213 | public function generateConstantsCoordinateOperationMethods(SQLite3 $sqlite): void |
@@ -1263,7 +1263,7 @@ discard block |
||
| 1263 | 1263 | $constants[] = $row; |
| 1264 | 1264 | } |
| 1265 | 1265 | |
| 1266 | - $this->updateFileConstants($this->sourceDir . '/CoordinateOperation/CoordinateOperationMethods.php', $constants, 'protected'); |
|
| 1266 | + $this->updateFileConstants($this->sourceDir.'/CoordinateOperation/CoordinateOperationMethods.php', $constants, 'protected'); |
|
| 1267 | 1267 | } |
| 1268 | 1268 | |
| 1269 | 1269 | public function generateDataCoordinateOperations(SQLite3 $sqlite): void |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | unset($data[$row['urn']]['bbox_west_bound_longitude']); |
| 1408 | 1408 | } |
| 1409 | 1409 | |
| 1410 | - $this->updateFileData($this->sourceDir . '/CoordinateOperation/CoordinateOperation.php', $data); |
|
| 1410 | + $this->updateFileData($this->sourceDir.'/CoordinateOperation/CoordinateOperation.php', $data); |
|
| 1411 | 1411 | } |
| 1412 | 1412 | |
| 1413 | 1413 | private function updateFileConstants(string $fileName, array $classConstants, string $visibility): void |
@@ -1450,7 +1450,7 @@ discard block |
||
| 1450 | 1450 | $prettyPrinter = new ASTPrettyPrinter(); |
| 1451 | 1451 | file_put_contents($fileName, $prettyPrinter->printFormatPreserving($newStmts, $oldStmts, $oldTokens)); |
| 1452 | 1452 | $this->csFixFile($fileName); |
| 1453 | - echo 'done' . PHP_EOL; |
|
| 1453 | + echo 'done'.PHP_EOL; |
|
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | 1456 | private function updateFileData(string $fileName, array $data): void |
@@ -1495,13 +1495,13 @@ discard block |
||
| 1495 | 1495 | $prettyPrinter = new ASTPrettyPrinter(); |
| 1496 | 1496 | file_put_contents($fileName, $prettyPrinter->printFormatPreserving($newStmts, $oldStmts, $oldTokens)); |
| 1497 | 1497 | $this->csFixFile($fileName); |
| 1498 | - echo 'done' . PHP_EOL; |
|
| 1498 | + echo 'done'.PHP_EOL; |
|
| 1499 | 1499 | } |
| 1500 | 1500 | |
| 1501 | 1501 | private function csFixFile(string $fileName): void |
| 1502 | 1502 | { |
| 1503 | 1503 | /** @var Config $config */ |
| 1504 | - $config = require __DIR__ . '/../../../.php_cs.dist'; |
|
| 1504 | + $config = require __DIR__.'/../../../.php_cs.dist'; |
|
| 1505 | 1505 | |
| 1506 | 1506 | $resolver = new ConfigurationResolver( |
| 1507 | 1507 | $config, |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $comment .= "/**\n"; |
| 68 | 68 | $helpLines = explode("\n", wordwrap($row['constant_help'], 112)); |
| 69 | 69 | foreach ($helpLines as $helpLine) { |
| 70 | - $comment .= '* ' . trim($helpLine) . "\n"; |
|
| 70 | + $comment .= '* '.trim($helpLine)."\n"; |
|
| 71 | 71 | } |
| 72 | 72 | if ($row['deprecated']) { |
| 73 | 73 | $comment .= "* @deprecated\n"; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $comment .= " */\n"; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $constName = strtoupper('EPSG_' . $name); |
|
| 78 | + $constName = strtoupper('EPSG_'.$name); |
|
| 79 | 79 | $constValue = is_string($row['constant_value']) ? new Node\Scalar\String_($row['constant_value']) : new Node\Scalar\LNumber($row['constant_value']); |
| 80 | 80 | $constComment = new Doc($comment); |
| 81 | 81 | $const = new Node\Const_($constName, $constValue); |
@@ -10,14 +10,14 @@ |
||
| 10 | 10 | |
| 11 | 11 | use PHPCoord\EPSG\Import\EPSGImporter; |
| 12 | 12 | |
| 13 | -require __DIR__ . '/../../../vendor/autoload.php'; |
|
| 13 | +require __DIR__.'/../../../vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Imports raw EPSG Dataset from Postgres format. |
| 17 | 17 | */ |
| 18 | 18 | $importer = new EPSGImporter(); |
| 19 | -echo '--CREATING SQLITE DB--' . PHP_EOL; |
|
| 19 | +echo '--CREATING SQLITE DB--'.PHP_EOL; |
|
| 20 | 20 | $importer->createSQLiteDB(); |
| 21 | -echo '--PERFORMING CODEGEN--' . PHP_EOL; |
|
| 21 | +echo '--PERFORMING CODEGEN--'.PHP_EOL; |
|
| 22 | 22 | $importer->doCodeGeneration(); |
| 23 | -echo '--IMPORT COMPLETE--' . PHP_EOL; |
|
| 23 | +echo '--IMPORT COMPLETE--'.PHP_EOL; |
|
@@ -172,7 +172,7 @@ |
||
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - return '(' . implode(', ', $values) . ')'; |
|
| 175 | + return '('.implode(', ', $values).')'; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
@@ -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 | ]; |