From 40837999e535bc8287ffc6527eb8fd25e634d89e Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 8 Feb 2024 21:38:57 +0300 Subject: [PATCH] rector --- .github/workflows/rector.yml | 4 +++- src/Flash/FlashInterface.php | 4 ++-- src/SessionInterface.php | 8 +++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index c597e60..35411d0 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -14,8 +14,10 @@ name: rector jobs: rector: uses: yiisoft/actions/.github/workflows/rector.yml@master + secrets: + token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: os: >- ['ubuntu-latest'] php: >- - ['8.2'] + ['8.3'] diff --git a/src/Flash/FlashInterface.php b/src/Flash/FlashInterface.php index 74e002a..12bae3b 100644 --- a/src/Flash/FlashInterface.php +++ b/src/Flash/FlashInterface.php @@ -41,7 +41,7 @@ public function getAll(): array; * regardless if it is accessed or not. If true (default value), the flash message will remain until after * it is accessed. */ - public function set(string $key, $value = true, bool $removeAfterAccess = true): void; + public function set(string $key, mixed $value = true, bool $removeAfterAccess = true): void; /** * Adds a flash message. @@ -54,7 +54,7 @@ public function set(string $key, $value = true, bool $removeAfterAccess = true): * regardless if it is accessed or not. If true (default value), the flash message will remain until after * it is accessed. */ - public function add(string $key, $value = true, bool $removeAfterAccess = true): void; + public function add(string $key, mixed $value = true, bool $removeAfterAccess = true): void; /** * Removes a flash message. diff --git a/src/SessionInterface.php b/src/SessionInterface.php index 5c560e9..6aaef49 100644 --- a/src/SessionInterface.php +++ b/src/SessionInterface.php @@ -17,7 +17,7 @@ interface SessionInterface * * @return mixed */ - public function get(string $key, $default = null); + public function get(string $key, mixed $default = null); /** * Write value into session. @@ -25,7 +25,7 @@ public function get(string $key, $default = null); * @param string $key Key to write value to. * @param mixed $value Value to write. */ - public function set(string $key, $value): void; + public function set(string $key, mixed $value): void; /** * Write session and close it. @@ -74,8 +74,6 @@ public function all(): array; /** * Remove value from session. - * - * @param string $key */ public function remove(string $key): void; @@ -96,7 +94,7 @@ public function has(string $key): bool; * * @return mixed The value. */ - public function pull(string $key, $default = null); + public function pull(string $key, mixed $default = null); /** * Remove session data from runtime.