diff --git a/composer.json b/composer.json index 9845103..307d4f0 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } ], "require" : { - "php": "^7.0|^8.0" + "php": "^7.1|^8.0" }, "require-dev": { "mikey179/vfsstream": "^1.6", diff --git a/src/Template/Func.php b/src/Template/Func.php index 79141f4..5ff5093 100644 --- a/src/Template/Func.php +++ b/src/Template/Func.php @@ -89,11 +89,11 @@ public function getCallback() /** * Call the function. - * @param Template $template - * @param array $arguments + * @param Template|null $template + * @param array $arguments * @return mixed */ - public function call(Template $template = null, $arguments = array()) + public function call(?Template $template = null, $arguments = array()) { if (is_array($this->callback) and isset($this->callback[0]) and diff --git a/src/Template/Template.php b/src/Template/Template.php index db11a9f..5473c9e 100644 --- a/src/Template/Template.php +++ b/src/Template/Template.php @@ -109,10 +109,10 @@ public function __toString() /** * Assign or get template data. - * @param array $data - * @return mixed + * @param array|null $data + * @return array|void */ - public function data(array $data = null) + public function data(?array $data = null) { if (is_null($data)) { return $this->data;