[Pkg-owncloud-commits] [php-sabre-vobject] 13/43: Added DEFAULT_YEAR constant

David Prévot taffit at moszumanska.debian.org
Sat Sep 5 15:23:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 4.0.0-alpha2
in repository php-sabre-vobject.

commit a5bf96ffbd9b5bc8b1d42424ddce1dd8d1751773
Author: Dominik Tobschall <dominik at fruux.com>
Date:   Mon Jul 20 20:49:44 2015 +0200

    Added DEFAULT_YEAR constant
---
 lib/BirthdayCalendarGenerator.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/BirthdayCalendarGenerator.php b/lib/BirthdayCalendarGenerator.php
index 97057bf..8dc059b 100644
--- a/lib/BirthdayCalendarGenerator.php
+++ b/lib/BirthdayCalendarGenerator.php
@@ -23,10 +23,8 @@ class BirthdayCalendarGenerator {
     /**
      * Default year.
      * Used for dates without a year.
-     *
-     * @var int
      */
-    protected $defaultYear = 2000;
+    const DEFAULT_YEAR = 2000;
 
     /**
      * Output format for the SUMMARY.
@@ -142,7 +140,7 @@ class BirthdayCalendarGenerator {
             $unknownYear = false;
 
             if (!$dateParts['year']) {
-                $object->BDAY = $this->defaultYear . '-' . $dateParts['month'] . '-' . $dateParts['date'];
+                $object->BDAY = self::DEFAULT_YEAR . '-' . $dateParts['month'] . '-' . $dateParts['date'];
 
                 $unknownYear = true;
             }
@@ -163,7 +161,7 @@ class BirthdayCalendarGenerator {
                 $event->add('X-SABRE-BDAY', 'BDAY', [
                     'X-SABRE-VCARD-UID' => $object->UID->getValue(),
                     'X-SABRE-VCARD-FN'  => $object->FN->getValue(),
-                    'X-SABRE-OMIT-YEAR' => $this->defaultYear,
+                    'X-SABRE-OMIT-YEAR' => self::DEFAULT_YEAR,
                 ]);
             } else {
                 $event->add('X-SABRE-BDAY', 'BDAY', [

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list