Skip to content

Commit 8dbadf2

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents d190e78 + 574e3cd commit 8dbadf2

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

src/deepskylog/AstronomyLibrary/Console/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function schedule(Schedule $schedule): void
3030
* to invoke the schedule method. The actual schedule method is protected
3131
* (as defined by Laravel), so expose a thin public shim that forwards to it.
3232
*
33-
* @param Schedule $schedule
33+
* @param Schedule $schedule
3434
* @return void
3535
*/
3636
public function callSchedule(Schedule $schedule): void

src/deepskylog/AstronomyLibrary/Targets/Target.php

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ public function calculateEphemerides(
989989
$th = new Coordinate($transitHeight, -90.0, 90.0);
990990
}
991991
$this->_maxHeight = new Coordinate($transitHeight, -90.0, 90.0);
992-
if (!isset($hasAstronomical) && !isset($hasNautical)) {
992+
if (! isset($hasAstronomical) && ! isset($hasNautical)) {
993993
// safety: if bounds weren't computed, set to null
994994
$this->_maxHeightAtNight = null;
995995
} elseif (! $hasAstronomical && ! $hasNautical) {
@@ -1795,7 +1795,7 @@ public function yearGraph(GeographicalCoordinates $geo_coords, Carbon $date, boo
17951795
}
17961796
}
17971797

1798-
$noAstrByDay[$day] = !$hasAstronomical;
1798+
$noAstrByDay[$day] = ! $hasAstronomical;
17991799
}
18001800

18011801
// Find contiguous runs of no-astronomical days and draw them. We map
@@ -1814,8 +1814,12 @@ public function yearGraph(GeographicalCoordinates $geo_coords, Carbon $date, boo
18141814
$endFrac = $runEnd / $daysInYear;
18151815
$x1 = (int) floor($left + $startFrac * $width) - 1;
18161816
$x2 = (int) ceil($left + $endFrac * $width) + 1;
1817-
if ($x1 < $left) $x1 = $left;
1818-
if ($x2 > $right) $x2 = $right;
1817+
if ($x1 < $left) {
1818+
$x1 = $left;
1819+
}
1820+
if ($x2 > $right) {
1821+
$x2 = $right;
1822+
}
18191823
imagefilledrectangle($image, $x1, 5, $x2, 365, $blue);
18201824
imagerectangle($image, $x1, 5, $x2, 365, $blueBorder);
18211825
$inRun = false;
@@ -1828,8 +1832,12 @@ public function yearGraph(GeographicalCoordinates $geo_coords, Carbon $date, boo
18281832
$endFrac = $runEnd / $daysInYear;
18291833
$x1 = (int) floor($left + $startFrac * $width) - 1;
18301834
$x2 = (int) ceil($left + $endFrac * $width) + 1;
1831-
if ($x1 < $left) $x1 = $left;
1832-
if ($x2 > $right) $x2 = $right;
1835+
if ($x1 < $left) {
1836+
$x1 = $left;
1837+
}
1838+
if ($x2 > $right) {
1839+
$x2 = $right;
1840+
}
18331841
imagefilledrectangle($image, $x1, 5, $x2, 365, $blue);
18341842
imagerectangle($image, $x1, 5, $x2, 365, $blueBorder);
18351843
}
@@ -1869,16 +1877,22 @@ public function yearGraph(GeographicalCoordinates $geo_coords, Carbon $date, boo
18691877
// maximum.
18701878
$allSamples = [];
18711879
for ($m = 1; $m <= 12; $m++) {
1872-
if (! isset($monthSamples[$m - 1])) continue;
1880+
if (! isset($monthSamples[$m - 1])) {
1881+
continue;
1882+
}
18731883
foreach ($monthSamples[$m - 1] as $s) {
18741884
$sampleDate = Carbon::create($year, $m, $s['day'], 12, 0, 0, $date->timezone);
18751885
$doy = $sampleDate->dayOfYear;
18761886
$frac = ($doy - 1) / $daysInYear;
18771887
$x = $left + $frac * $width;
18781888
$alt = $s['val'];
18791889
$y = 365 - $alt * 4;
1880-
if ($y < 5) $y = 5;
1881-
if ($y > 365) $y = 365;
1890+
if ($y < 5) {
1891+
$y = 5;
1892+
}
1893+
if ($y > 365) {
1894+
$y = 365;
1895+
}
18821896
$allSamples[] = ['doy' => $doy, 'x' => (int) $x, 'y' => (int) $y, 'val' => $alt];
18831897
}
18841898
}

src/deepskylog/AstronomyLibrary/Time.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Carbon\Exceptions\InvalidDateException;
2020
use deepskylog\AstronomyLibrary\Coordinates\GeographicalCoordinates;
2121
use deepskylog\AstronomyLibrary\Models\DeltaT;
22-
use Exception;
2322

2423
/**
2524
* Procedures to work with times.

0 commit comments

Comments
 (0)