summaryrefslogtreecommitdiff
path: root/src/ste/StorageAccess.php
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-09-13 22:25:15 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-09-13 22:25:15 +0200
commit76a1e915e0eea54b9b9a01d921efa6f9edffb3a8 (patch)
tree2d3140702e971cbe492561fea0f2d4c512366c07 /src/ste/StorageAccess.php
parent2bbb1646f56fe84f38ed2a0cba03a386acc6160e (diff)
downloadste-76a1e915e0eea54b9b9a01d921efa6f9edffb3a8.tar.gz
ste-76a1e915e0eea54b9b9a01d921efa6f9edffb3a8.tar.bz2
ste-76a1e915e0eea54b9b9a01d921efa6f9edffb3a8.zip
Code cleanup
- Add parameter and return types - Add missing @throws tags - Add visibilities to consts
Diffstat (limited to 'src/ste/StorageAccess.php')
-rw-r--r--src/ste/StorageAccess.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ste/StorageAccess.php b/src/ste/StorageAccess.php
index 38dea7e..ec7f6bc 100644
--- a/src/ste/StorageAccess.php
+++ b/src/ste/StorageAccess.php
@@ -9,10 +9,10 @@ namespace kch42\ste;
interface StorageAccess
{
/** @var int The template's source */
- const MODE_SOURCE = 0;
+ public const MODE_SOURCE = 0;
/** @var int The compiled template */
- const MODE_TRANSCOMPILED = 1;
+ public const MODE_TRANSCOMPILED = 1;
/**
* Loading a template.
@@ -30,7 +30,7 @@ interface StorageAccess
*
* @return string|callable Either the sourcecode or a callable function (first, and only parameter: an {@see STECore} instance).
*/
- public function load($tpl, &$mode);
+ public function load(string $tpl, string &$mode);
/**
* Saves a template.
@@ -41,5 +41,5 @@ interface StorageAccess
*
* @throws CantSaveTemplate If the template could not be saved.
*/
- public function save($tpl, $data, $mode);
+ public function save(string $tpl, string $data, int $mode): void;
}