diff --git a/classes/ProformaXMLElement.php b/classes/ProformaXMLElement.php index 9393f2f..df1fff9 100644 --- a/classes/ProformaXMLElement.php +++ b/classes/ProformaXMLElement.php @@ -41,7 +41,7 @@ * @author K.Borm */ class ProformaXMLElement /* extends SimpleXMLElement */ - implements ArrayAccess, Countable, Iterator{ + implements ArrayAccess, Countable, Iterator { /** Simple XML element instance */ private $element = null; @@ -91,7 +91,7 @@ public function __get($name) { * @return bool|void * @throws coding_exception */ - public function offsetExists($offset) { + public function offsetExists($offset) : bool { throw new coding_exception('not implemented offsetExists'); } @@ -100,7 +100,7 @@ public function offsetExists($offset) { * @param mixed $value * @throws coding_exception */ - public function offsetSet($offset, $value) { + public function offsetSet($offset, $value) : void { throw new coding_exception('not implemented offsetSet'); } @@ -108,7 +108,7 @@ public function offsetSet($offset, $value) { * @param mixed $offset * @throws coding_exception */ - public function offsetUnset($offset) { + public function offsetUnset($offset) : void { throw new coding_exception('not implemented offsetUnset'); } @@ -118,7 +118,7 @@ public function offsetUnset($offset) { * @param mixed $offset * @return mixed|SimpleXMLElement Either a named attribute or an element from a list of children */ - public function offsetGet ($offset) { + public function offsetGet ($offset) : mixed { return $this->element->attributes()->$offset; } @@ -126,7 +126,7 @@ public function offsetGet ($offset) { * return number of elements * @return int */ - public function count() { + public function count() : int { return count($this->element); } @@ -162,14 +162,14 @@ public function __toString () { * Iterator interface: return element at cursor position * @return mixed|ProformaXMLElement */ - public function current() { + public function current() : mixed { return new ProformaXMLElement($this->cursor, $this->namespace); } /** * Iterator interface: increment cursor */ - public function next() { + public function next() : void { $this->cursor = null; } @@ -178,7 +178,7 @@ public function next() { * @return bool|float|int|string|void|null * @throws coding_exception */ - public function key() { + public function key() : mixed { // TODO: Implement key() method. throw new coding_exception('not implemented key'); } @@ -187,14 +187,14 @@ public function key() { * Iterator interface: is cursor valid? * @return bool */ - public function valid() { + public function valid() : bool { return ($this->cursor != null); } /** * Iterator interface: reset cursor */ - public function rewind() { + public function rewind() : void { $this->cursor = $this->element; } diff --git a/version.php b/version.php index 374b7ea..3d5cba0 100644 --- a/version.php +++ b/version.php @@ -26,9 +26,9 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'qformat_proforma'; -$plugin->version = 2023061500; +$plugin->version = 2024031800; $plugin->requires = 2017111300; -$plugin->release = '1.3.0'; +$plugin->release = '1.3.1'; $plugin->maturity = MATURITY_STABLE; $plugin->dependencies = array(