Skip to content

Restrict Cocos (Keeling) Islands postcodes to 6799 - #28

Open
PierreQueyroi wants to merge 1 commit into
brick:mainfrom
PierreQueyroi:cc-single-postcode
Open

PierreQueyroi wants to merge 1 commit into
brick:mainfrom
PierreQueyroi:cc-single-postcode

Conversation

@PierreQueyroi

Copy link
Copy Markdown

The Cocos (Keeling) Islands have a single postcode, 6799, served by Australia Post. CCFormatter accepted any four digits, so values such as 1234 or 6000 passed as Cocos postcodes.

It now accepts 6799 only, the same way BLFormatter handles Saint Barthélemy's single postcode. The data provider gains 6799 as valid and 1234, 6798, 6800 as invalid; 1234 was accepted before.

Sources:

  • Wikipedia, Cocos (Keeling) Islands: "Postal services, managed by Australia Post, use the postcode 6799."
  • Google address data, CC: "zip": "6799"

How this was found: an AI-assisted comparison between this library and the JavaScript library postcode-validator, run over candidate postcodes generated from both rule sets, listed every country where the two disagree. Each disagreement is then checked against postal sources, and the ones where this library is wrong become a PR, one country at a time. Here postcode-validator already accepts 6799 only.

PHPUnit, PHPStan and ECS pass locally.

@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.21%. Comparing base (4c9484d) to head (27a01c5).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #28   +/-   ##
=========================================
  Coverage     99.21%   99.21%           
  Complexity      503      503           
=========================================
  Files           186      186           
  Lines          1022     1022           
=========================================
  Hits           1014     1014           
  Misses            8        8           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant