From d7b5e9274923bbb9bc3cd989bce350918224f327 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 10:07:22 +0900 Subject: [PATCH] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Greece.php | 12 ++++++------ src/Yasumi/Provider/Ireland.php | 16 ++++++++-------- src/Yasumi/Provider/Italy.php | 4 ++-- src/Yasumi/Provider/NewZealand.php | 12 ++++++------ src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 4 ++-- src/Yasumi/Provider/Portugal.php | 12 ++++++------ src/Yasumi/Provider/Romania.php | 12 ++++++------ 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index d0ce2521c..14ec3b972 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -79,7 +79,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateThreeHolyHierarchs(): void + private function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', @@ -104,7 +104,7 @@ public function calculateThreeHolyHierarchs(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCleanMonday(): void + private function calculateCleanMonday(): void { $this->addHoliday(new Holiday( 'cleanMonday', @@ -124,7 +124,7 @@ public function calculateCleanMonday(): void * * @throws \Exception */ - public function calculateEaster($year, $timezone): DateTime + private function calculateEaster($year, $timezone): DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } @@ -142,7 +142,7 @@ public function calculateEaster($year, $timezone): DateTime * @throws \Exception */ - public function calculateIndependenceDay(): void + private function calculateIndependenceDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -166,7 +166,7 @@ public function calculateIndependenceDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateOhiDay(): void + private function calculateOhiDay(): void { if ($this->year >= 1940) { $this->addHoliday(new Holiday( @@ -190,7 +190,7 @@ public function calculateOhiDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePolytechnio(): void + private function calculatePolytechnio(): void { if ($this->year >= 1973) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 739a64e8f..c15f971db 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -91,7 +91,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearsDay(): void + private function calculateNewYearsDay(): void { if ($this->year < 1974) { return; @@ -124,7 +124,7 @@ public function calculateNewYearsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePentecostMonday(): void + private function calculatePentecostMonday(): void { if ($this->year > 1973) { return; @@ -147,7 +147,7 @@ public function calculatePentecostMonday(): void * @throws \Exception * @throws \Exception */ - public function calculateChristmasDay(): void + private function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', @@ -184,7 +184,7 @@ public function calculateChristmasDay(): void * @throws \Exception * @throws \Exception */ - public function calculateStStephensDay(): void + private function calculateStStephensDay(): void { $holiday = new Holiday( 'stStephensDay', @@ -223,7 +223,7 @@ public function calculateStStephensDay(): void * @throws \Exception * @throws \Exception */ - public function calculateStPatricksDay(): void + private function calculateStPatricksDay(): void { if ($this->year < 1903) { return; @@ -265,7 +265,7 @@ public function calculateStPatricksDay(): void * @throws \Exception * @throws \Exception */ - public function calculateMayDay(): void + private function calculateMayDay(): void { if ($this->year < 1994) { return; @@ -293,7 +293,7 @@ public function calculateMayDay(): void * @throws \Exception * @throws \Exception */ - public function calculateJuneHoliday(): void + private function calculateJuneHoliday(): void { if ($this->year < 1974) { return; @@ -320,7 +320,7 @@ public function calculateJuneHoliday(): void * @throws \Exception * @throws \Exception */ - public function calculateOctoberHoliday(): void + private function calculateOctoberHoliday(): void { if ($this->year < 1977) { return; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 537019937..9469f64ba 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Exception * @throws \Exception */ - public function calculateLiberationDay(): void + private function calculateLiberationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -105,7 +105,7 @@ public function calculateLiberationDay(): void * @throws \Exception * @throws \Exception */ - public function calculateRepublicDay(): void + private function calculateRepublicDay(): void { if ($this->year >= 1946) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index a70280234..3cfb08228 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearHolidays(): void + private function calculateNewYearHolidays(): void { $newYearsDay = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); $dayAfterNewYearsDay = new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)); @@ -111,7 +111,7 @@ public function calculateNewYearHolidays(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateWaitangiDay(): void + private function calculateWaitangiDay(): void { if ($this->year < 1974) { return; @@ -141,7 +141,7 @@ public function calculateWaitangiDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAnzacDay(): void + private function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -174,7 +174,7 @@ public function calculateAnzacDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { if ($this->year < 1952) { return; @@ -207,7 +207,7 @@ public function calculateQueensBirthday(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { if ($this->year < 1900) { return; @@ -236,7 +236,7 @@ public function calculateLabourDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateChristmasHolidays(): void + private function calculateChristmasHolidays(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 03b42364e..a556746c2 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year >= 1836) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 4801f45a5..0112286d9 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Exception */ - public function calculateIndependenceDay(): void + private function calculateIndependenceDay(): void { if ($this->year < 1918) { return; @@ -105,7 +105,7 @@ public function calculateIndependenceDay(): void * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year < 1791) { return; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 77294a0aa..d722ee208 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -81,7 +81,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCarnationRevolutionDay(): void + private function calculateCarnationRevolutionDay(): void { if ($this->year >= 1974) { $this->addHoliday(new Holiday( @@ -103,7 +103,7 @@ public function calculateCarnationRevolutionDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCorpusChristi(): void + private function calculateCorpusChristi(): void { if ($this->year <= 2013 || $this->year >= 2016) { $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); @@ -128,7 +128,7 @@ public function calculateCorpusChristi(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePortugalDay(): void + private function calculatePortugalDay(): void { if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( @@ -160,7 +160,7 @@ public function calculatePortugalDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePortugueseRepublicDay(): void + private function calculatePortugueseRepublicDay(): void { if ($this->year >= 1910) { $this->addHoliday(new Holiday( @@ -181,7 +181,7 @@ public function calculatePortugueseRepublicDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAllSaintsDay(): void + private function calculateAllSaintsDay(): void { if ($this->year <= 2013 || $this->year >= 2016) { $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); @@ -213,7 +213,7 @@ public function calculateAllSaintsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateRestorationOfIndependenceDay(): void + private function calculateRestorationOfIndependenceDay(): void { // The Wikipedia article mentions that this has been a holiday since the second of half of the XIX century. if (($this->year >= 1850 && $this->year <= 2013) || $this->year >= 2016) { diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 460702433..975626eec 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -84,7 +84,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayAfterNewYearsDay(): void + private function calculateDayAfterNewYearsDay(): void { $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ 'en_US' => 'Day after New Year\'s Day', @@ -107,7 +107,7 @@ public function calculateDayAfterNewYearsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateUnitedPrincipalitiesDay(): void + private function calculateUnitedPrincipalitiesDay(): void { // The law is official since 21.12.2014. if ($this->year > 2014) { @@ -130,7 +130,7 @@ public function calculateUnitedPrincipalitiesDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStAndrewDay(): void + private function calculateStAndrewDay(): void { if ($this->year >= 2012) { $this->addHoliday(new Holiday('stAndrewDay', [ @@ -156,7 +156,7 @@ public function calculateStAndrewDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { $national_day = null; @@ -192,7 +192,7 @@ public function calculateNationalDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstantinBrancusiDay(): void + private function calculateConstantinBrancusiDay(): void { if ($this->year >= 2016) { $this->addHoliday(new Holiday( @@ -221,7 +221,7 @@ public function calculateConstantinBrancusiDay(): void * @throws \Exception * @throws \Exception */ - public function calculateChildrensDay(): void + private function calculateChildrensDay(): void { if ($this->year >= 1950 && $this->year <= 2016) { $this->addHoliday(new Holiday(