@@ -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 }
0 commit comments