From d28ace64337aad13f5b71441c39c1fbdec2871b0 Mon Sep 17 00:00:00 2001 From: dajiaohuang Date: Fri, 16 Oct 2026 10:03:11 +0800 Subject: [PATCH] =?UTF-8?q?docs(helpers):=20=F0=9F=93=9A=20correct=20broad?= =?UTF-8?q?cast=20contract=20and=20range=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + docs/04-helpers.md | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5198dd5..e852526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,7 @@ ### Project +- Correct the helper guide's broadcast return type and range example. - Add PHP `8.5` to the supported versions and the CI matrix. - Add a PHP-CS-Fixer ruleset. - Add test script that uses Docker to mirror the CI workflows. diff --git a/docs/04-helpers.md b/docs/04-helpers.md index 3a7f34e..8fbde6a 100644 --- a/docs/04-helpers.md +++ b/docs/04-helpers.md @@ -122,7 +122,7 @@ $networkIp->toProtocolAppropriateAddress(); // string("12.34.32.0") > ```text > @throws \Darsyn\IP\Exception\InvalidCidrException > -> getBroadcastIp(int $cidr): bool +> getBroadcastIp(int $cidr): IpInterface > ``` ```php @@ -148,11 +148,11 @@ $broadcastIp->toProtocolAppropriateAddress(); // string("12.34.63.255") inRange($hostIp, 11); // bool(true) -$clientIp->inRange($hostIp, 24); // bool(false) +$clientIp->inRange($hostIp, 24); // bool(true) +$clientIp->inRange($hostIp, 32); // bool(false) ``` ### Greatest Common CIDR