Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency symfony/yaml to v6 #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/Observer/ObserverTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions src/SunPosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
)
)
)
);

Expand Down
56 changes: 28 additions & 28 deletions tests/SolarDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

/**
Expand All @@ -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,
]);
}

/**
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down