Skip to content

Commit b3d8857

Browse files
authored
Merge pull request #62 from WimDeMeester/analysis-jLnva9
Apply fixes from StyleCI
2 parents 48b38d3 + bb36607 commit b3d8857

3 files changed

Lines changed: 29 additions & 29 deletions

File tree

src/deepskylog/AstronomyLibrary/AstronomyLibraryServiceProvider.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace deepskylog\AstronomyLibrary;
44

5-
use Illuminate\Support\ServiceProvider;
65
use deepskylog\AstronomyLibrary\Commands\UpdateDeltaTTable;
76
use deepskylog\AstronomyLibrary\Commands\UpdateOrbitalElements;
7+
use Illuminate\Support\ServiceProvider;
88

99
class AstronomyLibraryServiceProvider extends ServiceProvider
1010
{
@@ -20,51 +20,51 @@ public function boot()
2020
// Publish the migration
2121
$this->publishes(
2222
[
23-
__DIR__ . '/../../database/migrations/create_deltat_table.php.stub' => database_path(
24-
'migrations/' . date('Y_m_d_His', time())
25-
. '_create_deltat_table.php'
23+
__DIR__.'/../../database/migrations/create_deltat_table.php.stub' => database_path(
24+
'migrations/'.date('Y_m_d_His', time())
25+
.'_create_deltat_table.php'
2626
),
2727
],
2828
'migrations'
2929
);
3030
$this->publishes(
3131
[
32-
__DIR__ . '/../../../data/deltat.csv' => database_path(
32+
__DIR__.'/../../../data/deltat.csv' => database_path(
3333
'deltat.csv'
3434
),
3535
],
3636
'migrations'
3737
);
3838
$this->publishes(
3939
[
40-
__DIR__ . '/../../database/migrations/create_comets_orbital_elements_table.php.stub' => database_path(
41-
'migrations/' . date('Y_m_d_His', time())
42-
. '_create_comets_orbital_elements_table.php'
40+
__DIR__.'/../../database/migrations/create_comets_orbital_elements_table.php.stub' => database_path(
41+
'migrations/'.date('Y_m_d_His', time())
42+
.'_create_comets_orbital_elements_table.php'
4343
),
4444
],
4545
'migrations'
4646
);
4747
$this->publishes(
4848
[
49-
__DIR__ . '/../../database/migrations/create_asteroids_orbital_elements_table.php.stub' => database_path(
50-
'migrations/' . date('Y_m_d_His', time())
51-
. '_create_asteroids_orbital_elements_table.php'
49+
__DIR__.'/../../database/migrations/create_asteroids_orbital_elements_table.php.stub' => database_path(
50+
'migrations/'.date('Y_m_d_His', time())
51+
.'_create_asteroids_orbital_elements_table.php'
5252
),
5353
],
5454
'migrations'
5555
);
5656
$this->publishes(
5757
[
58-
__DIR__ . '/../../database/migrations/create_constellation_boundaries_table.php.stub' => database_path(
59-
'migrations/' . date('Y_m_d_His', time())
60-
. '_create_constellation_boundaries_table.php'
58+
__DIR__.'/../../database/migrations/create_constellation_boundaries_table.php.stub' => database_path(
59+
'migrations/'.date('Y_m_d_His', time())
60+
.'_create_constellation_boundaries_table.php'
6161
),
6262
],
6363
'migrations'
6464
);
6565
$this->publishes(
6666
[
67-
__DIR__ . '/../../../data/conlines.csv' => database_path(
67+
__DIR__.'/../../../data/conlines.csv' => database_path(
6868
'conlines.csv'
6969
),
7070
],

src/deepskylog/AstronomyLibrary/Commands/UpdateDeltaTTable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace deepskylog\AstronomyLibrary\Commands;
44

5+
use deepskylog\AstronomyLibrary\Imports\DeltaTImport;
6+
use deepskylog\AstronomyLibrary\Models\DeltaT;
57
use Illuminate\Console\Command;
68
use Maatwebsite\Excel\Facades\Excel;
7-
use deepskylog\AstronomyLibrary\Models\DeltaT;
8-
use deepskylog\AstronomyLibrary\Imports\DeltaTImport;
99

1010
class UpdateDeltaTTable extends Command
1111
{

src/deepskylog/AstronomyLibrary/Commands/UpdateOrbitalElements.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace deepskylog\AstronomyLibrary\Commands;
44

5-
use Illuminate\Console\Command;
6-
use deepskylog\AstronomyLibrary\Models\CometsOrbitalElements;
75
use deepskylog\AstronomyLibrary\Models\AsteroidsOrbitalElements;
6+
use deepskylog\AstronomyLibrary\Models\CometsOrbitalElements;
7+
use Illuminate\Console\Command;
88

99
class UpdateOrbitalElements extends Command
1010
{
@@ -45,20 +45,20 @@ public function handle()
4545
// Remove the old entries
4646
CometsOrbitalElements::truncate();
4747

48-
$cnt = 0;
48+
$cnt = 0;
4949
// Loop over the orbital elements line by line
5050
foreach (preg_split("/((\r?\n)|(\r\n?))/", $contents) as $line) {
5151
if ($cnt > 1) {
5252
// The first 43 characters are the name
53-
$name = trim(substr($line, 0, 43));
53+
$name = trim(substr($line, 0, 43));
5454
// Character 44 - 51 is the epoch
5555
$epoch = intval(substr($line, 44, 8)) + 2400000.5;
5656
// Character 52 - 63 is q: perihelion distance in AU
57-
$q = floatval(substr($line, 52, 12));
57+
$q = floatval(substr($line, 52, 12));
5858
// Character 64 - 75 is e, the eccentricity of the orbit
59-
$e = floatval(substr($line, 64, 11));
59+
$e = floatval(substr($line, 64, 11));
6060
// Character 75 - 85 is i, the inclination of the orbit
61-
$i = floatval(substr($line, 75, 10));
61+
$i = floatval(substr($line, 75, 10));
6262
// w: The argument of perihelion
6363
$w = floatval(substr($line, 85, 10));
6464
// node: Longitude of the ascending node
@@ -95,22 +95,22 @@ public function handle()
9595
// Remove the old entries
9696
AsteroidsOrbitalElements::truncate();
9797

98-
$cnt = 0;
98+
$cnt = 0;
9999
// Loop over the orbital elements line by line
100100
foreach (preg_split("/((\r?\n)|(\r\n?))/", $contents) as $line) {
101101
if ($cnt > 1) {
102102
// Character 0 - 6 is the number
103103
$number = intval(substr($line, 0, 6));
104104
// Characters 7 - 25 is the name
105-
$name = trim(substr($line, 7, 18));
105+
$name = trim(substr($line, 7, 18));
106106
// Character 25 - 31 is the epoch
107107
$epoch = intval(substr($line, 25, 6)) + 2400000.5;
108108
// Character 31 - 42 is a: semi-major axis in AU
109-
$a = floatval(substr($line, 31, 11));
109+
$a = floatval(substr($line, 31, 11));
110110
// Character 42 - 53 is e, the eccentricity of the orbit
111-
$e = floatval(substr($line, 42, 11));
111+
$e = floatval(substr($line, 42, 11));
112112
// Character 53 - 63 is i, the inclination of the orbit
113-
$i = floatval(substr($line, 53, 10));
113+
$i = floatval(substr($line, 53, 10));
114114
// w: The argument of perihelion
115115
$w = floatval(substr($line, 63, 10));
116116
// node: Longitude of the ascending node

0 commit comments

Comments
 (0)