aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Node.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/vobject/lib/Node.php')
-rw-r--r--vendor/sabre/vobject/lib/Node.php82
1 files changed, 32 insertions, 50 deletions
diff --git a/vendor/sabre/vobject/lib/Node.php b/vendor/sabre/vobject/lib/Node.php
index e2845da75..154a7fac5 100644
--- a/vendor/sabre/vobject/lib/Node.php
+++ b/vendor/sabre/vobject/lib/Node.php
@@ -11,13 +11,8 @@ use Sabre\Xml;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-abstract class Node
- implements \IteratorAggregate,
- \ArrayAccess,
- \Countable,
- \JsonSerializable,
- Xml\XmlSerializable {
-
+abstract class Node implements \IteratorAggregate, \ArrayAccess, \Countable, \JsonSerializable, Xml\XmlSerializable
+{
/**
* The following constants are used by the validate() method.
*
@@ -70,7 +65,7 @@ abstract class Node
*
* @return string
*/
- abstract function serialize();
+ abstract public function serialize();
/**
* This method returns an array, with the representation as it should be
@@ -78,31 +73,26 @@ abstract class Node
*
* @return array
*/
- abstract function jsonSerialize();
+ abstract public function jsonSerialize();
/**
* This method serializes the data into XML. This is used to create xCard or
* xCal documents.
*
- * @param Xml\Writer $writer XML writer.
- *
- * @return void
+ * @param Xml\Writer $writer XML writer
*/
- abstract function xmlSerialize(Xml\Writer $writer);
+ abstract public function xmlSerialize(Xml\Writer $writer);
/**
* Call this method on a document if you're done using it.
*
* It's intended to remove all circular references, so PHP can easily clean
* it up.
- *
- * @return void
*/
- function destroy() {
-
+ public function destroy()
+ {
$this->parent = null;
$this->root = null;
-
}
/* {{{ IteratorAggregator interface */
@@ -112,14 +102,13 @@ abstract class Node
*
* @return ElementList
*/
- function getIterator() {
-
+ public function getIterator()
+ {
if (!is_null($this->iterator)) {
return $this->iterator;
}
return new ElementList([$this]);
-
}
/**
@@ -128,13 +117,10 @@ abstract class Node
* Note that this is not actually part of the iterator interface
*
* @param ElementList $iterator
- *
- * @return void
*/
- function setIterator(ElementList $iterator) {
-
+ public function setIterator(ElementList $iterator)
+ {
$this->iterator = $iterator;
-
}
/**
@@ -159,10 +145,9 @@ abstract class Node
*
* @return array
*/
- function validate($options = 0) {
-
+ public function validate($options = 0)
+ {
return [];
-
}
/* }}} */
@@ -174,18 +159,17 @@ abstract class Node
*
* @return int
*/
- function count() {
-
+ public function count()
+ {
$it = $this->getIterator();
- return $it->count();
+ return $it->count();
}
/* }}} */
/* {{{ ArrayAccess Interface */
-
/**
* Checks if an item exists through ArrayAccess.
*
@@ -195,11 +179,11 @@ abstract class Node
*
* @return bool
*/
- function offsetExists($offset) {
-
+ public function offsetExists($offset)
+ {
$iterator = $this->getIterator();
- return $iterator->offsetExists($offset);
+ return $iterator->offsetExists($offset);
}
/**
@@ -211,11 +195,11 @@ abstract class Node
*
* @return mixed
*/
- function offsetGet($offset) {
-
+ public function offsetGet($offset)
+ {
$iterator = $this->getIterator();
- return $iterator->offsetGet($offset);
+ return $iterator->offsetGet($offset);
}
/**
@@ -223,21 +207,20 @@ abstract class Node
*
* This method just forwards the request to the inner iterator
*
- * @param int $offset
+ * @param int $offset
* @param mixed $value
- *
- * @return void
*/
- function offsetSet($offset, $value) {
-
+ public function offsetSet($offset, $value)
+ {
$iterator = $this->getIterator();
$iterator->offsetSet($offset, $value);
- // @codeCoverageIgnoreStart
+ // @codeCoverageIgnoreStart
//
// This method always throws an exception, so we ignore the closing
// brace
}
+
// @codeCoverageIgnoreEnd
/**
@@ -246,19 +229,18 @@ abstract class Node
* This method just forwards the request to the inner iterator
*
* @param int $offset
- *
- * @return void
*/
- function offsetUnset($offset) {
-
+ public function offsetUnset($offset)
+ {
$iterator = $this->getIterator();
$iterator->offsetUnset($offset);
- // @codeCoverageIgnoreStart
+ // @codeCoverageIgnoreStart
//
// This method always throws an exception, so we ignore the closing
// brace
}
+
// @codeCoverageIgnoreEnd
/* }}} */