[Pkg-owncloud-commits] [php-sabre-vobject] 16/341: More sensiolabs tweaks.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:27 UTC 2015


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

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 4a2aeeefe80036fabbde803154caf786c51c194a
Author: Evert Pot <me at evertpot.com>
Date:   Tue Oct 7 17:41:02 2014 -0400

    More sensiolabs tweaks.
---
 lib/ITip/Broker.php              |  4 ++--
 lib/Property/ICalendar/Recur.php | 30 ++++++++++++++----------------
 lib/Recur/EventIterator.php      |  1 -
 3 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/lib/ITip/Broker.php b/lib/ITip/Broker.php
index 306d7da..c319984 100644
--- a/lib/ITip/Broker.php
+++ b/lib/ITip/Broker.php
@@ -734,9 +734,9 @@ class Broker {
                 $dt = DateTimeParser::parse($instance['id'], $eventInfo['timezone']);
                 // Treat is as a DATE field
                 if (strlen($instance['id']) <= 8) {
-                    $recur = $event->add('DTSTART', $dt, array('VALUE' => 'DATE'));
+                    $event->add('DTSTART', $dt, array('VALUE' => 'DATE'));
                 } else {
-                    $recur = $event->add('DTSTART', $dt);
+                    $event->add('DTSTART', $dt);
                 }
                 if ($summary) {
                     $event->add('SUMMARY', $summary);
diff --git a/lib/Property/ICalendar/Recur.php b/lib/Property/ICalendar/Recur.php
index 2df095f..ded13c8 100644
--- a/lib/Property/ICalendar/Recur.php
+++ b/lib/Property/ICalendar/Recur.php
@@ -2,9 +2,7 @@
 
 namespace Sabre\VObject\Property\ICalendar;
 
-use
-    Sabre\VObject\Property,
-    Sabre\VObject\Parser\MimeDir;
+use Sabre\VObject\Property;
 
 /**
  * Recur property
@@ -33,7 +31,7 @@ class Recur extends Property {
      * @param string|array $value
      * @return void
      */
-    public function setValue($value) {
+    function setValue($value) {
 
         // If we're getting the data from json, we'll be receiving an object
         if ($value instanceof \StdClass) {
@@ -41,7 +39,7 @@ class Recur extends Property {
         }
 
         if (is_array($value)) {
-            $newVal = array();
+            $newVal = [];
             foreach($value as $k=>$v) {
 
                 if (is_string($v)) {
@@ -77,9 +75,9 @@ class Recur extends Property {
      *
      * @return string
      */
-    public function getValue() {
+    function getValue() {
 
-        $out = array();
+        $out = [];
         foreach($this->value as $key=>$value) {
             $out[] = $key . '=' . (is_array($value)?implode(',', $value):$value);
         }
@@ -93,7 +91,7 @@ class Recur extends Property {
      * @param array $parts
      * @return void
      */
-    public function setParts(array $parts) {
+    function setParts(array $parts) {
 
         $this->setValue($parts);
 
@@ -107,7 +105,7 @@ class Recur extends Property {
      *
      * @return array
      */
-    public function getParts() {
+    function getParts() {
 
         return $this->value;
 
@@ -122,7 +120,7 @@ class Recur extends Property {
      * @param string $val
      * @return void
      */
-    public function setRawMimeDirValue($val) {
+    function setRawMimeDirValue($val) {
 
         $this->setValue($val);
 
@@ -133,7 +131,7 @@ class Recur extends Property {
      *
      * @return string
      */
-    public function getRawMimeDirValue() {
+    function getRawMimeDirValue() {
 
         return $this->getValue();
 
@@ -147,7 +145,7 @@ class Recur extends Property {
      *
      * @return string
      */
-    public function getValueType() {
+    function getValueType() {
 
         return "RECUR";
 
@@ -160,13 +158,13 @@ class Recur extends Property {
      *
      * @return array
      */
-    public function getJsonValue() {
+    function getJsonValue() {
 
-        $values = array();
+        $values = [];
         foreach($this->getParts() as $k=>$v) {
             $values[strtolower($k)] = $v;
         }
-        return array($values);
+        return [$values];
 
     }
 
@@ -179,7 +177,7 @@ class Recur extends Property {
     static function stringToArray($value) {
 
         $value = strtoupper($value);
-        $newValue = array();
+        $newValue = [];
         foreach(explode(';', $value) as $part) {
 
             // Skipping empty parts.
diff --git a/lib/Recur/EventIterator.php b/lib/Recur/EventIterator.php
index 10266f7..d0cc2ad 100644
--- a/lib/Recur/EventIterator.php
+++ b/lib/Recur/EventIterator.php
@@ -67,7 +67,6 @@ class EventIterator implements \Iterator {
      */
     function __construct(Component $vcal, $uid = null) {
 
-        $rrule = null;
         if ($vcal instanceof VEvent) {
             // Single instance mode.
             $events = [$vcal];

-- 
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