diff --git a/composer.json b/composer.json index 059a81e..0e5591b 100755 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "phpstan/phpstan": "0.12.11", "phpunit/phpunit": "*", "squizlabs/php_codesniffer": "3.5.6", - "symfony/yaml": "~2.1|~3.0|~4.0" + "symfony/yaml": "6.2.7" }, "config": { "sort-packages": true diff --git a/src/Observer/ObserverTime.php b/src/Observer/ObserverTime.php index b73e70f..e7aa0af 100644 --- a/src/Observer/ObserverTime.php +++ b/src/Observer/ObserverTime.php @@ -18,7 +18,7 @@ class ObserverTime * ΔT is the difference between the Earth rotation time and the Terrestrial Time (TT). * It is derived from observation only and reported yearly in the Astronomical Almanac. * - * @param float $ΔT + * @param float $ΔT */ public $ΔT = 0; public $JulianEphemerisDay = 0; @@ -27,8 +27,7 @@ class ObserverTime private function calcJulianDay() { - -// is the month of the year (e.g. 1 for January, ..etc.). + // is the month of the year (e.g. 1 for January, ..etc.). // !!! Note that if M > 2, then Y and M are not changed // !!! ,but if M = 1 or 2, then Y = Y -1 and M = M + 12. diff --git a/src/SunPosition.php b/src/SunPosition.php index a465982..0367e16 100644 --- a/src/SunPosition.php +++ b/src/SunPosition.php @@ -424,11 +424,11 @@ public function calculate() $Δe° *= (283.0 / (273.0 + $T)); $Δe° *= ( 1.02 / ( - 60.0 * tan( - // e0° is in degrees. Calculate the tangent argument in degrees, - // then convert to radians if required by calculator or computer. + 60.0 * tan( + // e0° is in degrees. Calculate the tangent argument in degrees, + // then convert to radians if required by calculator or computer. $this->_toRadians($e0° + 10.3 / ($e0° + 5.11)) - ) + ) ) ); diff --git a/tests/SolarDataTest.php b/tests/SolarDataTest.php index 0119b56..54f8729 100644 --- a/tests/SolarDataTest.php +++ b/tests/SolarDataTest.php @@ -34,15 +34,15 @@ public function testSetObserverPosition() { $this->mock->setObserverPosition(31, -7, 400); $this->assertSame( - [ - (float) 31, - (float) -7, - (float) 400, - ], [ - $this->mock->getObserver()->ObserverPosition->latitude, - $this->mock->getObserver()->ObserverPosition->longitude, - $this->mock->getObserver()->ObserverPosition->altitude, - ]); + [ + (float) 31, + (float) -7, + (float) 400, + ], [ + $this->mock->getObserver()->ObserverPosition->latitude, + $this->mock->getObserver()->ObserverPosition->longitude, + $this->mock->getObserver()->ObserverPosition->altitude, + ]); } /** @@ -54,15 +54,15 @@ public function testSetObserverDate() { $this->mock->setObserverDate(2000, 1, 1); $this->assertSame( - [ - (float) 2000, - (float) 1, - (float) 1, - ], [ - $this->mock->getObserver()->ObserverTime->Year, - $this->mock->getObserver()->ObserverTime->Month, - $this->mock->getObserver()->ObserverTime->Day, - ]); + [ + (float) 2000, + (float) 1, + (float) 1, + ], [ + $this->mock->getObserver()->ObserverTime->Year, + $this->mock->getObserver()->ObserverTime->Month, + $this->mock->getObserver()->ObserverTime->Day, + ]); } /** @@ -74,15 +74,15 @@ public function testSetObserverTime() { $this->mock->setObserverTime(12, 0); $this->assertSame( - [ - (float) 12, - (float) 0, - (float) 0, - ], [ - $this->mock->getObserver()->ObserverTime->Hour, - $this->mock->getObserver()->ObserverTime->Minute, - $this->mock->getObserver()->ObserverTime->Second, - ]); + [ + (float) 12, + (float) 0, + (float) 0, + ], [ + $this->mock->getObserver()->ObserverTime->Hour, + $this->mock->getObserver()->ObserverTime->Minute, + $this->mock->getObserver()->ObserverTime->Second, + ]); } public function dataProviderTableA4_julianDay() @@ -331,7 +331,7 @@ public function testDataTestSunInfoPHP($datatime, $sundata) .date('H:i', $ZTSunrise).' is out of tollerance error respect '.date('H:i', $ZTSunrise_check).PHP_EOL .date('H:i', $ZTTransit).' is out of tollerance error respect '.date('H:i', $ZTTransit_check).PHP_EOL .date('H:i', $ZTSunset).' is out of tollerance error respect '.date('H:i', $ZTSunset_check).PHP_EOL - ); + ); } private function getTestHMfromHMS($timeHMS)