diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index e3da9de..48d9aff 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -131,10 +131,10 @@ jobs:
run: php -d memory_limit=-1 vendor/bin/phpcs --standard=PSR12 tests
- name: PHPStan (Src)
- run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max src
+ run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 src
- name: PHPStan (Tests)
- run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max tests
+ run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 tests
tests-phpunit:
runs-on: ubuntu-latest
diff --git a/phpunit.xml b/phpunit.xml
index 737b01e..8ab85e2 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -14,7 +14,7 @@
stopOnWarning="true"
bootstrap="vendor/autoload.php"
cacheDirectory="tests/build/cache"
- xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.0/phpunit.xsd"
backupStaticProperties="false"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
@@ -25,9 +25,7 @@
>
-
-
diff --git a/src/LionRequest/Response.php b/src/LionRequest/Response.php
index 5ba29d7..c2cf78d 100644
--- a/src/LionRequest/Response.php
+++ b/src/LionRequest/Response.php
@@ -53,7 +53,8 @@ public static function finish(mixed $response, bool $isJson = true): never
* @param string $status The type of status on the object.
* @param string|null $message Message inside the object.
* @param int $code HTTP status code inside the object.
- * @param mixed $data Extra data inside the object.
+ * @param array|bool|float|int|null|object|string $data Extra data inside
+ * the object.
*
* @return stdClass
*/
@@ -61,7 +62,7 @@ public static function custom(
string $status,
?string $message = null,
int $code = Http::OK,
- mixed $data = null
+ array|bool|float|int|null|object|string $data = null
): stdClass {
http_response_code($code);
@@ -83,12 +84,16 @@ public static function custom(
*
* @param string|null $message Message inside the object.
* @param int $code HTTP status code inside the object.
- * @param mixed $data Extra data inside the object.
+ * @param array|bool|float|int|null|object|string $data Extra data inside
+ * the object.
*
* @return stdClass
*/
- public static function success(?string $message = null, int $code = Http::OK, mixed $data = null): stdClass
- {
+ public static function success(
+ ?string $message = null,
+ int $code = Http::OK,
+ array|bool|float|int|null|object|string $data = null
+ ): stdClass {
return self::custom(Status::SUCCESS, $message, $code, $data);
}
@@ -97,7 +102,8 @@ public static function success(?string $message = null, int $code = Http::OK, mi
*
* @param string|null $message Message inside the object.
* @param int $code HTTP status code inside the object.
- * @param mixed $data Extra data inside the object.
+ * @param array|bool|float|int|null|object|string $data Extra data inside
+ * the object.
*
* @return stdClass
*/
@@ -114,12 +120,16 @@ public static function error(
*
* @param string|null $message Message inside the object.
* @param int $code HTTP status code inside the object.
- * @param mixed $data Extra data inside the object.
+ * @param array|bool|float|int|null|object|string $data Extra data inside
+ * the object.
*
* @return stdClass
*/
- public static function warning(?string $message = null, int $code = Http::OK, mixed $data = null): stdClass
- {
+ public static function warning(
+ ?string $message = null,
+ int $code = Http::OK,
+ array|bool|float|int|null|object|string $data = null
+ ): stdClass {
return self::custom(Status::WARNING, $message, $code, $data);
}
@@ -128,12 +138,16 @@ public static function warning(?string $message = null, int $code = Http::OK, mi
*
* @param string|null $message Message inside the object.
* @param int $code HTTP status code inside the object.
- * @param mixed $data Extra data inside the object.
+ * @param array|bool|float|int|null|object|string $data Extra data inside
+ * the object.
*
* @return stdClass
*/
- public static function info(?string $message = null, int $code = Http::OK, mixed $data = null): stdClass
- {
+ public static function info(
+ ?string $message = null,
+ int $code = Http::OK,
+ array|bool|float|int|null|object|string $data = null
+ ): stdClass {
return self::custom(Status::INFO, $message, $code, $data);
}
}