-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from WimDeMeester/analysis-RPl1yp
Apply fixes from StyleCI
- Loading branch information
Showing
37 changed files
with
680 additions
and
749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,10 @@ | |
* PHP Version 8 | ||
* | ||
* @category AstronomyLibrary | ||
* | ||
* @author Deepsky Developers <[email protected]> | ||
* @license GPL3 <https://opensource.org/licenses/GPL-3.0> | ||
* | ||
* @link http://www.deepskylog.org | ||
*/ | ||
|
||
|
@@ -26,8 +28,10 @@ | |
* PHP Version 8 | ||
* | ||
* @category AstronomyLibrary | ||
* | ||
* @author Deepsky Developers <[email protected]> | ||
* @license GPL3 <https://opensource.org/licenses/GPL-3.0> | ||
* | ||
* @link http://www.deepskylog.org | ||
*/ | ||
class AstronomyLibrary | ||
|
@@ -45,9 +49,9 @@ class AstronomyLibrary | |
/** | ||
* The constructor. | ||
* | ||
* @param Carbon $carbonDate The date | ||
* @param GeographicalCoordinates $coordinates The geographical coordinates | ||
* @param float $height The height of the location | ||
* @param Carbon $carbonDate The date | ||
* @param GeographicalCoordinates $coordinates The geographical coordinates | ||
* @param float $height The height of the location | ||
*/ | ||
public function __construct( | ||
Carbon $carbonDate, | ||
|
@@ -79,8 +83,7 @@ public function getDate(): Carbon | |
/** | ||
* Sets the date and time. | ||
* | ||
* @param Carbon $date The new Carbon date | ||
* | ||
* @param Carbon $date The new Carbon date | ||
* @return None | ||
*/ | ||
public function setDate(Carbon $date): void | ||
|
@@ -109,8 +112,7 @@ public function getGeographicalCoordinates(): GeographicalCoordinates | |
/** | ||
* Sets the date and time. | ||
* | ||
* @param GeographicalCoordinates $coordinates The new geographical coordinates | ||
* | ||
* @param GeographicalCoordinates $coordinates The new geographical coordinates | ||
* @return None | ||
*/ | ||
public function setGeographicalCoordinates( | ||
|
@@ -138,8 +140,7 @@ public function getHeight(): float | |
/** | ||
* Sets the height of the location in meters. | ||
* | ||
* @param float $height The height of the location in meters | ||
* | ||
* @param float $height The height of the location in meters | ||
* @return None | ||
*/ | ||
public function setHeight( | ||
|
@@ -162,8 +163,7 @@ public function getJd(): float | |
/** | ||
* Sets the julian day and adapt the date. | ||
* | ||
* @param float $jd The julian day | ||
* | ||
* @param float $jd The julian day | ||
* @return None | ||
*/ | ||
public function setJd(float $jd): void | ||
|
@@ -238,8 +238,7 @@ public function getNutation(): array | |
/** | ||
* Converts from Equatorial coordinates to ecliptical coordinates. | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* @return EclipticalCoordinates the ecliptical coordinates for J2000 | ||
*/ | ||
public function equatorialToEcliptical( | ||
|
@@ -251,8 +250,7 @@ public function equatorialToEcliptical( | |
/** | ||
* Converts from Ecliptical coordinates to Equatorial coordinates. | ||
* | ||
* @param EclipticalCoordinates $coords the ecliptical coordinates to convert | ||
* | ||
* @param EclipticalCoordinates $coords the ecliptical coordinates to convert | ||
* @return EquatorialCoordinates The equatorial coordinates in J2000 | ||
*/ | ||
public function eclipticalToEquatorial( | ||
|
@@ -264,8 +262,7 @@ public function eclipticalToEquatorial( | |
/** | ||
* Converts from Equatorial coordinates to horizontal coordinates. | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* @return HorizontalCoordinates the horizontal coordinates for the date and | ||
* location | ||
*/ | ||
|
@@ -283,8 +280,7 @@ public function equatorialToHorizontal( | |
* negative before and positive after the passage throught the southern | ||
* meridian. This is the effect of the moon that is lying down at moonrise. | ||
* | ||
* @param EquatorialCoordinates $coords The coordinates of the object | ||
* | ||
* @param EquatorialCoordinates $coords The coordinates of the object | ||
* @return float the parallactic angle in degrees | ||
*/ | ||
public function parallacticAngle(EquatorialCoordinates $coords): float | ||
|
@@ -298,8 +294,7 @@ public function parallacticAngle(EquatorialCoordinates $coords): float | |
/** | ||
* Converts from Horizontal coordinates to Equatorial coordinates. | ||
* | ||
* @param HorizontalCoordinates $coords the horizontal coordinates to convert | ||
* | ||
* @param HorizontalCoordinates $coords the horizontal coordinates to convert | ||
* @return EquatorialCoordinates The equatorial coordinates | ||
*/ | ||
public function horizontalToEquatorial( | ||
|
@@ -314,8 +309,7 @@ public function horizontalToEquatorial( | |
/** | ||
* Converts from Equatorial coordinates to Galactic coordinates. | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* | ||
* @param EquatorialCoordinates $coords the equatorial coordinates to convert | ||
* @return GalacticCoordinates The galactic coordinates (J2000) | ||
*/ | ||
public function equatorialToGalactic( | ||
|
@@ -327,8 +321,7 @@ public function equatorialToGalactic( | |
/** | ||
* Converts from Galactic coordinates to Equatorial coordinates. | ||
* | ||
* @param GalacticCoordinates $coords the galactic coordinates to convert | ||
* | ||
* @param GalacticCoordinates $coords the galactic coordinates to convert | ||
* @return EquatorialCoordinates The equatorial coordinates | ||
*/ | ||
public function galacticToEquatorial( | ||
|
@@ -340,8 +333,7 @@ public function galacticToEquatorial( | |
/** | ||
* Creates a chart with the length of the year during the year. | ||
* | ||
* @param string $timezone the timezone to create the graph for | ||
* | ||
* @param string $timezone the timezone to create the graph for | ||
* @return string The chart with the length of the night | ||
*/ | ||
public function getLengthOfNightPlot($timezone): string | ||
|
@@ -687,7 +679,7 @@ public function getLengthOfNightPlot($timezone): string | |
} | ||
// Date line | ||
$red = imagecolorallocate($image, 255, 0, 0); | ||
$datelocation = 2 * ($this->getDate()->dayOfYear); | ||
$datelocation = 2 * $this->getDate()->dayOfYear; | ||
imageline($image, $datelocation + 70, 5, $datelocation + 70, 365, $red); | ||
|
||
imageline($image, 802, 365, 802, 355, $axiscolor); | ||
|
@@ -731,12 +723,11 @@ public function getLengthOfNightPlot($timezone): string | |
* Returns true if the three bodies are in a straight line. | ||
* Chapter 19 of Astronomical Algorithms. | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the second object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the thirds object | ||
* @param float $threshold The threshold for the method | ||
* (default value is 10e-06) | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the second object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the thirds object | ||
* @param float $threshold The threshold for the method | ||
* (default value is 10e-06) | ||
* @return bool True if the three bodies are in a straight line | ||
*/ | ||
public function isInStraightLine( | ||
|
@@ -752,10 +743,9 @@ public function isInStraightLine( | |
* Returns the deviation from a straight line. | ||
* Chapter 19 of Astronomical Algorithms. | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the second object | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the second object | ||
* @return Coordinate the deviation from the straight line | ||
*/ | ||
public function deviationFromStraightLine( | ||
|
@@ -770,10 +760,9 @@ public function deviationFromStraightLine( | |
* Returns the smallest circle containing three celestial bodies. | ||
* Chapter 20 of Astronomical Algorithms. | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the second object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the third object | ||
* | ||
* @param EquatorialCoordinates $coords1 The coordinates of the first object | ||
* @param EquatorialCoordinates $coords2 The coordinates of the second object | ||
* @param EquatorialCoordinates $coords3 The coordinates of the third object | ||
* @return Coordinate the diameter of the smallest circle | ||
*/ | ||
public function smallestCircle( | ||
|
@@ -787,8 +776,7 @@ public function smallestCircle( | |
/** | ||
* Returns the apparent place of a star. | ||
* | ||
* @param EquatorialCoordinates $coords The coordinates to start with | ||
* | ||
* @param EquatorialCoordinates $coords The coordinates to start with | ||
* @return EquatorialCoordinates The apparent place for the star | ||
*/ | ||
public function apparentPlace( | ||
|
@@ -801,8 +789,7 @@ public function apparentPlace( | |
* Returns rhoSinPhi and rhoCosPhi. | ||
* Needed for the calculation of the parallax. | ||
* | ||
* @param float $height The height of the location | ||
* | ||
* @param float $height The height of the location | ||
* @return array with rhoSinPhi and rhoCosPhi | ||
* | ||
* See Chapter 11 of Astronomical Algorithms | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,10 @@ | |
* PHP Version 8 | ||
* | ||
* @category Coordinates | ||
* | ||
* @author Deepsky Developers <[email protected]> | ||
* @license GPL3 <https://opensource.org/licenses/GPL-3.0> | ||
* | ||
* @link http://www.deepskylog.org | ||
*/ | ||
|
||
|
@@ -19,8 +21,10 @@ | |
* PHP Version 8 | ||
* | ||
* @category Coordinates | ||
* | ||
* @author Deepsky Developers <[email protected]> | ||
* @license GPL3 <https://opensource.org/licenses/GPL-3.0> | ||
* | ||
* @link http://www.deepskylog.org | ||
*/ | ||
class Coordinate | ||
|
@@ -32,9 +36,9 @@ class Coordinate | |
/** | ||
* The constructor. | ||
* | ||
* @param float $coordinate The coordinate | ||
* @param float $minValue The minimum value for the coordinate | ||
* @param float $maxValue The maximum value for the coordinate | ||
* @param float $coordinate The coordinate | ||
* @param float $minValue The minimum value for the coordinate | ||
* @param float $maxValue The maximum value for the coordinate | ||
*/ | ||
public function __construct( | ||
float $coordinate, | ||
|
@@ -50,8 +54,7 @@ public function __construct( | |
/** | ||
* Set the coordinate. | ||
* | ||
* @param float $coord the coordinate to set | ||
* | ||
* @param float $coord the coordinate to set | ||
* @return None | ||
*/ | ||
public function setCoordinate(float $coord): void | ||
|
@@ -185,8 +188,7 @@ public function convertToShortHours(): string | |
/** | ||
* Sets the minimum valid value for the coordinate. | ||
* | ||
* @param float $minValue The minimum valid value | ||
* | ||
* @param float $minValue The minimum valid value | ||
* @return None | ||
*/ | ||
public function setMinValue(float $minValue): void | ||
|
@@ -197,8 +199,7 @@ public function setMinValue(float $minValue): void | |
/** | ||
* Sets the maximum valid value for the first coordinate. | ||
* | ||
* @param float $maxValue The maximum valid value | ||
* | ||
* @param float $maxValue The maximum valid value | ||
* @return None | ||
*/ | ||
public function setMaxValue(float $maxValue): void | ||
|
Oops, something went wrong.