[Pkg-owncloud-commits] [php-sabre-vobject] 206/341: Refactor a variable.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:48 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 e6e0feb76559c2c08a1732dcb7d7e117723abd57
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Mon Jan 26 15:32:10 2015 +0100

    Refactor a variable.
---
 lib/Property/Text.php | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/Property/Text.php b/lib/Property/Text.php
index 962a9cf..004b370 100644
--- a/lib/Property/Text.php
+++ b/lib/Property/Text.php
@@ -296,24 +296,23 @@ class Text extends Property {
      */
     protected function xmlSerializeValue(Xml\Writer $writer) {
 
+        $values = $this->getParts();
+
         // Special-casing the REQUEST-STATUS property.
         //
         // See:
         // http://tools.ietf.org/html/rfc6321#section-3.4.1.3
         if ($this->name === 'REQUEST-STATUS') {
 
-            $value = $this->getParts();
-
-            $writer->writeElement('code', $value[0]);
-            $writer->writeElement('description', $value[1]);
+            $writer->writeElement('code', $values[0]);
+            $writer->writeElement('description', $values[1]);
 
-            if (isset($value[2])) {
-                $writer->writeElement('data', $value[2]);
+            if (isset($values[2])) {
+                $writer->writeElement('data', $values[2]);
             }
 
         } elseif ($this->name === 'N') {
 
-            $values = $this->getParts();
             $mapping = [
                 'surname'    => !empty($values[0]) ? $values[0] : null,
                 'given'      => !empty($values[1]) ? $values[1] : null,

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