@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | */ |
7 | 7 | declare(strict_types=1); |
8 | 8 | |
9 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
9 | +require __DIR__.'/../../vendor/autoload.php'; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Imports raw EPSG Dataset from Postgres format. |
13 | 13 | */ |
14 | -$dbPath = __DIR__ . '/epsg.sqlite'; |
|
15 | -$srcDir = dirname(__DIR__, 2) . '/src'; |
|
14 | +$dbPath = __DIR__.'/epsg.sqlite'; |
|
15 | +$srcDir = dirname(__DIR__, 2).'/src'; |
|
16 | 16 | |
17 | 17 | createSQLiteDB($dbPath); |
18 | 18 | createInterfacesWithIDs($dbPath, $srcDir); |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $sqlite->enableExceptions(true); |
33 | 33 | $sqlite->exec('PRAGMA journal_mode=WAL'); //WAL is faster |
34 | 34 | |
35 | - $tableSchema = file_get_contents(__DIR__ . '/PostgreSQL_Table_Script.sql'); |
|
35 | + $tableSchema = file_get_contents(__DIR__.'/PostgreSQL_Table_Script.sql'); |
|
36 | 36 | $sqlite->exec($tableSchema); |
37 | 37 | |
38 | - $tableData = file_get_contents(__DIR__ . '/PostgreSQL_Data_Script.sql'); |
|
38 | + $tableData = file_get_contents(__DIR__.'/PostgreSQL_Data_Script.sql'); |
|
39 | 39 | $sqlite->exec($tableData); |
40 | 40 | |
41 | 41 | $sqlite->exec('VACUUM'); |
@@ -170,20 +170,20 @@ discard block |
||
170 | 170 | $php .= "/**\n"; |
171 | 171 | $helpLines = explode("\n", trim(wordwrap($row['constant_help'], 112))); |
172 | 172 | foreach ($helpLines as $helpLine) { |
173 | - $php .= '* ' . $helpLine . "\n"; |
|
173 | + $php .= '* '.$helpLine."\n"; |
|
174 | 174 | } |
175 | 175 | if ($row['deprecated']) { |
176 | 176 | $php .= "* @deprecated\n"; |
177 | 177 | } |
178 | 178 | $php .= " */\n"; |
179 | 179 | } |
180 | - $php .= sprintf("public const %s = %d;\n\n", strtoupper('EPSG_' . $name), $row['constant_value']); |
|
180 | + $php .= sprintf("public const %s = %d;\n\n", strtoupper('EPSG_'.$name), $row['constant_value']); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $php .= '}'; |
184 | 184 | |
185 | 185 | $psr4Dir = str_replace(['PHPCoord\\', '\\'], ['', '/'], $namespaceName); |
186 | - file_put_contents($srcDir . "/$psr4Dir/{$interfaceName}.php", $php); |
|
186 | + file_put_contents($srcDir."/$psr4Dir/{$interfaceName}.php", $php); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | function csFixGeneratedFiles(string $srcDir): void |
@@ -39,7 +39,7 @@ |
||
39 | 39 | private function getConnection(): SQLite3 |
40 | 40 | { |
41 | 41 | if (!static::$connection instanceof SQLite3) { |
42 | - static::$connection = new SQLite3(__DIR__ . '/../../resources/epsg/epsg.sqlite', SQLITE3_OPEN_READONLY); |
|
42 | + static::$connection = new SQLite3(__DIR__.'/../../resources/epsg/epsg.sqlite', SQLITE3_OPEN_READONLY); |
|
43 | 43 | static::$connection->enableExceptions(true); |
44 | 44 | } |
45 | 45 |
@@ -46,11 +46,11 @@ |
||
46 | 46 | |
47 | 47 | public function getFormattedValue(): string |
48 | 48 | { |
49 | - return $this->change->getValue() . ' ' . $this->change->getUnitName() . ' per ' . $this->time->getUnitName(); |
|
49 | + return $this->change->getValue().' '.$this->change->getUnitName().' per '.$this->time->getUnitName(); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function getUnitName(): string |
53 | 53 | { |
54 | - return $this->change->getUnitName() . ' per ' . $this->time->getUnitName(); |
|
54 | + return $this->change->getUnitName().' per '.$this->time->getUnitName(); |
|
55 | 55 | } |
56 | 56 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function getFormattedValue(): string |
48 | 48 | { |
49 | - return $this->scale . ' ' . $this->name; |
|
49 | + return $this->scale.' '.$this->name; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function getUnitName(): string |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getFormattedValue(): string |
32 | 32 | { |
33 | - return $this->length . 'm'; |
|
33 | + return $this->length.'m'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getUnitName(): string |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function getFormattedValue(): string |
48 | 48 | { |
49 | - return $this->length . ' ' . $this->name; |
|
49 | + return $this->length.' '.$this->name; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function getUnitName(): string |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function getFormattedValue(): string |
34 | 34 | { |
35 | - return $this->time . ' years'; |
|
35 | + return $this->time.' years'; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getUnitName(): string |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function getFormattedValue(): string |
32 | 32 | { |
33 | - return $this->time . 's'; |
|
33 | + return $this->time.'s'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getUnitName(): string |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function getFormattedValue(): string |
48 | 48 | { |
49 | - return $this->angle . ' ' . $this->name; |
|
49 | + return $this->angle.' '.$this->name; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function getUnitName(): string |