summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-09-29 22:21:06 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-09-30 13:21:17 +0200
commitefe6006ced4f91d0df1fdb0aef7f0079273ac0d0 (patch)
tree7fa0268f50f6377347a968cd01f31755aa9bc2e5
parentaecb05f5e762ac08534dc144798571e68eba0562 (diff)
downloadphp-git-efe6006ced4f91d0df1fdb0aef7f0079273ac0d0.tar.gz
Review parameter names in ext/session
Closes GH-6239
-rw-r--r--ext/session/session.stub.php42
-rw-r--r--ext/session/session_arginfo.h18
2 files changed, 35 insertions, 25 deletions
diff --git a/ext/session/session.stub.php b/ext/session/session.stub.php
index 36a0b983b9..d8c9b67e50 100644
--- a/ext/session/session.stub.php
+++ b/ext/session/session.stub.php
@@ -43,35 +43,45 @@ function session_commit(): bool {}
* @param callable|object $open
* @param callable|bool $close
*/
-function session_set_save_handler($open, $close = UNKNOWN, callable $read = UNKNOWN, callable $write = UNKNOWN, callable $destroy = UNKNOWN, callable $gc = UNKNOWN, callable $create_sid = UNKNOWN, callable $validate_sid = UNKNOWN, callable $update_timestamp = UNKNOWN): bool {}
+function session_set_save_handler(
+ $open,
+ $close = UNKNOWN,
+ callable $read = UNKNOWN,
+ callable $write = UNKNOWN,
+ callable $destroy = UNKNOWN,
+ callable $gc = UNKNOWN,
+ callable $create_sid = UNKNOWN,
+ callable $validate_sid = UNKNOWN,
+ callable $update_timestamp = UNKNOWN
+): bool {}
-function session_cache_limiter(?string $cache_limiter = null): string|false {}
+function session_cache_limiter(?string $value = null): string|false {}
-function session_cache_expire(?int $new_cache_expire = null): int|false {}
+function session_cache_expire(?int $value = null): int|false {}
-function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {}
+function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {}
function session_start(array $options = []): bool {}
interface SessionHandlerInterface
{
/** @return bool */
- public function open(string $save_path, string $session_name);
+ public function open(string $path, string $name);
/** @return bool */
public function close();
/** @return string */
- public function read(string $key);
+ public function read(string $id);
/** @return bool */
- public function write(string $key, string $val);
+ public function write(string $id, string $data);
/** @return bool */
- public function destroy(string $key);
+ public function destroy(string $id);
/** @return int|bool */
- public function gc(int $maxlifetime);
+ public function gc(int $max_lifetime);
}
interface SessionIdInterface
@@ -83,31 +93,31 @@ interface SessionIdInterface
interface SessionUpdateTimestampHandlerInterface
{
/** @return bool */
- public function validateId(string $key);
+ public function validateId(string $id);
/** @return bool */
- public function updateTimestamp(string $key, string $val);
+ public function updateTimestamp(string $id, string $data);
}
class SessionHandler implements SessionHandlerInterface, SessionIdInterface
{
/** @return bool */
- public function open(string $save_path, string $session_name) {}
+ public function open(string $path, string $name) {}
/** @return bool */
public function close() {}
/** @return string */
- public function read(string $key) {}
+ public function read(string $id) {}
/** @return bool */
- public function write(string $key, string $val) {}
+ public function write(string $id, string $data) {}
/** @return bool */
- public function destroy(string $key) {}
+ public function destroy(string $id) {}
/** @return int|bool */
- public function gc(int $maxlifetime) {}
+ public function gc(int $max_lifetime) {}
/** @return string */
public function create_sid() {}
diff --git a/ext/session/session_arginfo.h b/ext/session/session_arginfo.h
index f29a0df86b..0c82feabb2 100644
--- a/ext/session/session_arginfo.h
+++ b/ext/session/session_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 9bdf602c14822b13553a5214a415e312c21cd30c */
+ * Stub hash: 8175feea632f2832e43d830e70dc9332377b9f22 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_name, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null")
@@ -70,11 +70,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_save_handler, 0, 1,
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_limiter, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_limiter, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_session_cache_expire, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_cache_expire, IS_LONG, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_LONG, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_set_cookie_params, 0, 1, _IS_BOOL, 0)
@@ -90,26 +90,26 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_session_start, 0, 0, _IS_BOOL, 0
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_open, 0, 0, 2)
- ZEND_ARG_TYPE_INFO(0, save_path, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, session_name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_close, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_read, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_write, 0, 0, 2)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, val, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_SessionHandlerInterface_destroy arginfo_class_SessionHandlerInterface_read
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SessionHandlerInterface_gc, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, maxlifetime, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, max_lifetime, IS_LONG, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_SessionIdInterface_create_sid arginfo_class_SessionHandlerInterface_close