Skip to content

Commit

Permalink
Changed visibility of internal class functions to 'private'. These ar…
Browse files Browse the repository at this point in the history
…e to be used within the class only and should not be public.

Signed-off-by: Sacha Telgenhof <stelgenhof@gmail.com>
  • Loading branch information
stelgenhof committed Jan 23, 2019
1 parent 13dd203 commit d7b5e92
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 37 deletions.
12 changes: 6 additions & 6 deletions src/Yasumi/Provider/Greece.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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);
}
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down
16 changes: 8 additions & 8 deletions src/Yasumi/Provider/Ireland.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -147,7 +147,7 @@ public function calculatePentecostMonday(): void
* @throws \Exception
* @throws \Exception
*/
public function calculateChristmasDay(): void
private function calculateChristmasDay(): void
{
$holiday = new Holiday(
'christmasDay',
Expand Down Expand Up @@ -184,7 +184,7 @@ public function calculateChristmasDay(): void
* @throws \Exception
* @throws \Exception
*/
public function calculateStStephensDay(): void
private function calculateStStephensDay(): void
{
$holiday = new Holiday(
'stStephensDay',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Yasumi/Provider/Italy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 6 additions & 6 deletions src/Yasumi/Provider/NewZealand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Norway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/Yasumi/Provider/Poland.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function initialize(): void
* @throws \Exception
*/

public function calculateIndependenceDay(): void
private function calculateIndependenceDay(): void
{
if ($this->year < 1918) {
return;
Expand Down Expand Up @@ -105,7 +105,7 @@ public function calculateIndependenceDay(): void
* @throws \Exception
*/

public function calculateConstitutionDay(): void
private function calculateConstitutionDay(): void
{
if ($this->year < 1791) {
return;
Expand Down
12 changes: 6 additions & 6 deletions src/Yasumi/Provider/Portugal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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));
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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));
Expand Down Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions src/Yasumi/Provider/Romania.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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) {
Expand All @@ -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', [
Expand All @@ -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;

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit d7b5e92

Please sign in to comment.