From 813d3b18e0ec68993a3bedea597f75f2c11317ff Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 18 Jun 2024 23:02:13 +0200 Subject: [PATCH] PHPDoc avoid aliases for scalar types https://php.net/language.types.declarations Also helps PHPStan, which otherwise makes another lookup as it might be in the SimplePie namespace, and which fails in some cases. --- src/HTTP/Parser.php | 2 +- src/Item.php | 6 +++--- src/Misc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/HTTP/Parser.php b/src/HTTP/Parser.php index 35889365..60a19ca1 100644 --- a/src/HTTP/Parser.php +++ b/src/HTTP/Parser.php @@ -475,7 +475,7 @@ protected function chunked() * Prepare headers (take care of proxies headers) * * @param string $headers Raw headers - * @param integer $count Redirection count. Default to 1. + * @param int $count Redirection count. Default to 1. * * @return string */ diff --git a/src/Item.php b/src/Item.php index 5d75a1f7..8cb172fe 100644 --- a/src/Item.php +++ b/src/Item.php @@ -175,7 +175,7 @@ public function get_feed() * MD5 hash based on the permalink, title and content. * * @since Beta 2 - * @param boolean $hash Should we force using a hash instead of the supplied ID? + * @param bool $hash Should we force using a hash instead of the supplied ID? * @param string|false $fn User-supplied function to generate an hash * @return string|null */ @@ -252,7 +252,7 @@ public function get_title() * `` * * @since 0.8 - * @param boolean $description_only Should we avoid falling back to the content? + * @param bool $description_only Should we avoid falling back to the content? * @return string|null */ public function get_description(bool $description_only = false) @@ -302,7 +302,7 @@ public function get_description(bool $description_only = false) * Uses `` or `` (RSS 1.0 Content Module) * * @since 1.0 - * @param boolean $content_only Should we avoid falling back to the description? + * @param bool $content_only Should we avoid falling back to the description? * @return string|null */ public function get_content(bool $content_only = false) diff --git a/src/Misc.php b/src/Misc.php index d5e07586..1aaef27f 100644 --- a/src/Misc.php +++ b/src/Misc.php @@ -283,7 +283,7 @@ public static function windows_1252_to_utf8(string $string) * @param string $data Raw data in $input encoding * @param string $input Encoding of $data * @param string $output Encoding you want - * @return string|boolean False if we can't convert it + * @return string|bool False if we can't convert it */ public static function change_encoding(string $data, string $input, string $output) {