From 21763a4f6a6574bc8a09b9aaabd1e9bcafbae6c8 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sat, 6 Jan 2018 21:59:51 +0100
Subject: [PATCH] Add missing declarations

---
 modules/riak/lib/Store/Store.php | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/modules/riak/lib/Store/Store.php b/modules/riak/lib/Store/Store.php
index a1ddcb013..baa440393 100644
--- a/modules/riak/lib/Store/Store.php
+++ b/modules/riak/lib/Store/Store.php
@@ -22,8 +22,13 @@
  * and Information Technology.
  */
 
-class sspmod_riak_Store_Store extends SimpleSAML\Store {
-	protected function __construct() {
+class sspmod_riak_Store_Store extends SimpleSAML\Store
+{
+    public $client;
+    public $bucket;
+
+	protected function __construct()
+    {
 		$config = SimpleSAML_Configuration::getConfig('module_riak.php');
 
 		$path = $config->getString('path', 'riak-php-client/riak.php');
@@ -43,19 +48,20 @@ class sspmod_riak_Store_Store extends SimpleSAML\Store {
 	 * @param string $key  The key.
 	 * @return mixed|NULL  The value.
 	 */
-	public function get($type, $key) {
+	public function get($type, $key)
+    {
 		assert(is_string($type));
 		assert(is_string($key));
 
 		$v = $this->bucket->getBinary("$type.$key");
 		if (!$v->exists()) {
-			return (NULL);
+			return null;
 		}
 
 		$expires = $v->getIndex('Expires', 'int');
 		if (sizeof($expires) && (int)array_shift($expires) <= time()) {
 			$v->delete();
-			return (NULL);
+			return null;
 		}
 
 		return (unserialize($v->getData()));
@@ -70,7 +76,8 @@ class sspmod_riak_Store_Store extends SimpleSAML\Store {
 	 * @param mixed $value  The value.
 	 * @param int|NULL $expire  The expiration time (unix timestamp), or NULL if it never expires.
 	 */
-	public function set($type, $key, $value, $expire = NULL) {
+	public function set($type, $key, $value, $expire = null)
+    {
 		assert(is_string($type));
 		assert(is_string($key));
 		assert($expire === null || (is_int($expire) && $expire > 2592000));
@@ -89,7 +96,8 @@ class sspmod_riak_Store_Store extends SimpleSAML\Store {
 	 * @param string $type  The datatype.
 	 * @param string $key  The key.
 	 */
-	public function delete($type, $key) {
+	public function delete($type, $key)
+    {
 		assert(is_string($type));
 		assert(is_string($key));
 
-- 
GitLab