Skip to content

Commit

Permalink
Updated inline documentation to include correction Exception throws.
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Telgenhof <[email protected]>
  • Loading branch information
stelgenhof committed Jan 22, 2018
1 parent 42c1f5e commit f088c88
Show file tree
Hide file tree
Showing 95 changed files with 164 additions and 23 deletions.
3 changes: 3 additions & 0 deletions src/Yasumi/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ public function getYear()
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \RuntimeException
* @throws \InvalidArgumentException
* @throws \ReflectionException
*
* @covers AbstractProvider::anotherTime
*/
Expand All @@ -351,6 +352,7 @@ public function next($shortName)
* @throws InvalidArgumentException when the given name is blank or empty.
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \RuntimeException
* @throws \ReflectionException
*/
private function anotherTime($year, $shortName)
{
Expand Down Expand Up @@ -390,6 +392,7 @@ public function getHoliday($shortName)
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \RuntimeException
* @throws \InvalidArgumentException
* @throws \ReflectionException
*
* @covers AbstractProvider::anotherTime
*/
Expand Down
7 changes: 7 additions & 0 deletions src/Yasumi/Provider/Australia.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Australia extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down Expand Up @@ -69,6 +70,7 @@ public function initialize()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateAustraliaDay()
{
Expand All @@ -88,6 +90,7 @@ public function calculateAustraliaDay()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateHoliday(
$shortName,
Expand Down Expand Up @@ -120,6 +123,7 @@ public function calculateHoliday(
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateNewYearHolidays()
{
Expand All @@ -142,6 +146,7 @@ public function calculateNewYearHolidays()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateAnzacDay()
{
Expand All @@ -164,6 +169,7 @@ public function calculateAnzacDay()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateChristmasDay()
{
Expand Down Expand Up @@ -199,6 +205,7 @@ public function calculateChristmasDay()
* @link https://www.timeanddate.com/holidays/australia/queens-birthday
*
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function calculateQueensBirthday()
{
Expand Down
4 changes: 4 additions & 0 deletions src/Yasumi/Provider/Australia/Victoria.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Victoria extends Australia
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand All @@ -45,6 +46,9 @@ public function initialize()
$this->calculateAFLGrandFinalDay();
}

/**
* @throws \Exception
*/
public function calculateChristmasDay()
{
$christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone));
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Austria.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Austria extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Belgium.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Belgium extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Brazil.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Brazil extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
10 changes: 10 additions & 0 deletions src/Yasumi/Provider/ChristianHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function easter($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function easterMonday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -100,6 +101,7 @@ public function easterMonday($year, $timezone, $locale, $type = Holiday::TYPE_OF
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function ascensionDay($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -128,6 +130,7 @@ public function ascensionDay($year, $timezone, $locale, $type = Holiday::TYPE_OF
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function pentecost($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -156,6 +159,7 @@ public function pentecost($year, $timezone, $locale, $type = Holiday::TYPE_OFFIC
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function pentecostMonday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -187,6 +191,7 @@ public function pentecostMonday($year, $timezone, $locale, $type = Holiday::TYPE
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function corpusChristi($year, $timezone, $locale, $type = Holiday::TYPE_OTHER)
{
Expand Down Expand Up @@ -363,6 +368,7 @@ public function assumptionOfMary($year, $timezone, $locale, $type = Holiday::TYP
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function goodFriday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -421,6 +427,7 @@ public function epiphany($year, $timezone, $locale, $type = Holiday::TYPE_OFFICI
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function ashWednesday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -545,6 +552,7 @@ public function stJosephsDay($year, $timezone, $locale, $type = Holiday::TYPE_OF
*
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function maundyThursday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL)
{
Expand Down Expand Up @@ -653,6 +661,7 @@ public function annunciation($year, $timezone, $locale, $type = Holiday::TYPE_OF
*
* @link http://php.net/manual/en/function.easter-date.php#83794
* @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm
* @throws \Exception
*/
public function calculateOrthodoxEaster($year, $timezone)
{
Expand Down Expand Up @@ -726,6 +735,7 @@ public function reformationDay($year, $timezone, $locale, $type = Holiday::TYPE_
* @param string $timezone the timezone in which Easter is celebrated
*
* @return \DateTime date of Easter
* @throws \Exception
*/
protected function calculateEaster($year, $timezone)
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Croatia.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Croatia extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/CzechRepublic.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CzechRepublic extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Yasumi/Provider/Denmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Denmark extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down Expand Up @@ -71,6 +72,7 @@ public function initialize()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function calculateGreatPrayerDay()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Estonia.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Estonia extends AbstractProvider
* Initialize holidays for Estonia.
*
* @throws \InvalidArgumentException
* @throws \Exception
*/
public function initialize()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Yasumi/Provider/Finland.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Finland extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down Expand Up @@ -119,6 +120,7 @@ public function calculateStJohnsDay()
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
private function calculateAllSaintsDay()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/France.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class France extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/France/BasRhin.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class BasRhin extends France
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/France/HautRhin.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class HautRhin extends France
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/France/Moselle.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Moselle extends France
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Germany extends AbstractProvider
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/BadenWurttemberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class BadenWurttemberg extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Bavaria.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Bavaria extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Brandenburg.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Brandenburg extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Hesse.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Hesse extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class MecklenburgWesternPomerania extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/NorthRhineWestphalia.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class NorthRhineWestphalia extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/RhinelandPalatinate.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class RhinelandPalatinate extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Saarland.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Saarland extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Saxony.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Saxony extends Germany
* Initialize holidays for Saxony (Germany).
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/SaxonyAnhalt.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class SaxonyAnhalt extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/Provider/Germany/Thuringia.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Thuringia extends Germany
*
* @throws \InvalidArgumentException
* @throws \Yasumi\Exception\UnknownLocaleException
* @throws \Exception
*/
public function initialize()
{
Expand Down
Loading

0 comments on commit f088c88

Please sign in to comment.