Skip to content

docs(helpers): correct broadcast return type and range example - #137

Merged
zanbaldwin merged 1 commit into
darsyn:6.xfrom
dajiaohuang:docs/helper-contract-examples-20261016
Oct 17, 2026
Merged

zanbaldwin merged 1 commit into
darsyn:6.xfrom
dajiaohuang:docs/helper-contract-examples-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

What and why

Two existing helper-guide examples contradict the public API:

  • getBroadcastIp() is shown as returning bool, but returns a new IP value object (as its example and ArithmeticInterface already expect).
  • The inRange() example supplies :ffff:c22:384e, which has a single leading colon rather than valid IPv6 notation and cannot reach either comparison. Replace the example with RFC 5737 documentation addresses in the same /24, showing both a matching /24 and a non-matching /32.

This changes documentation only; no parsing or comparison semantics change. Includes a changelog note.

Validation

  • PHP 8.3.6: exercised public constructors, binary/hex/integer round trips, formatting, documentation-address classification, comparisons, network/broadcast and address arithmetic using only synthetic documentation addresses.
  • Checked the documented broadcast signature against its actual object result; the guide-contract check fails on the base and passes with this change.
  • Extracted the corrected range example's addresses/prefixes from the Markdown and verified both annotated boolean results.
  • Repeated the public-use checks without GMP/mbstring (php -n, with ctype loaded).
  • All source PHP files pass syntax lint; git diff --check passes.
  • Full PHPUnit/PHPStan/PHP-CS-Fixer and PHP version matrix not run locally: Composer dependency resolution is blocked by the local PHP installation lacking ext-dom. No runtime code/tests changed.

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] No blocking findings; the documentation-only changes are suitable to merge.

Summary

Corrects two examples in the helper guide:

  • The helper guide shows the broadcast IP result and range outcomes.

Adds a changelog note. No runtime code changes or actionable issues found. The documentation agrees with the public contract and comparison implementation. No blocking issue was identified; this documentation-only change is suitable to merge.

T-Rex validation blocked

The broadcast and range examples could not be executed because PHP CLI is unavailable in this environment. Both attempted checks exited 127, and no API return values were observed. Scripts and output logs were preserved locally, but no evidence-upload mechanism was available, so remote upload could not be confirmed.

Reviews (1) · Last reviewed commit: "docs(helpers): 📚 correct broadcast cont..." · Reviewed by Greptile

@zanbaldwin
zanbaldwin merged commit dc68e67 into darsyn:6.x Oct 17, 2026
1 check passed
@zanbaldwin

Copy link
Copy Markdown
Member

Thank you for the pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants