{"id":29358248,"url":"https://github.com/labrodev/postal-formatter","last_synced_at":"2026-05-19T09:07:06.936Z","repository":{"id":301546821,"uuid":"1009569990","full_name":"labrodev/postal-formatter","owner":"labrodev","description":"PHP 8.1+ utility library that provides robust formatting for European postal codes, following official formatting standards country-by-country.","archived":false,"fork":false,"pushed_at":"2025-06-27T11:56:44.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T06:09:24.174Z","etag":null,"topics":["helper","laravel","php","php-functions","php-library","php-package","php-tools","php-utility","php8","postal-codes","postals","web"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labrodev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T10:48:57.000Z","updated_at":"2025-06-27T11:56:20.000Z","dependencies_parsed_at":"2025-06-27T12:51:32.979Z","dependency_job_id":null,"html_url":"https://github.com/labrodev/postal-formatter","commit_stats":null,"previous_names":["labrodev/postal-formatter"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/labrodev/postal-formatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Fpostal-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Fpostal-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Fpostal-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Fpostal-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labrodev","download_url":"https://codeload.github.com/labrodev/postal-formatter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labrodev%2Fpostal-formatter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33209493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helper","laravel","php","php-functions","php-library","php-package","php-tools","php-utility","php8","postal-codes","postals","web"],"created_at":"2025-07-09T06:09:21.255Z","updated_at":"2026-05-19T09:07:06.919Z","avatar_url":"https://github.com/labrodev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Postal Formatter\n\n**Labrodev\\PostalFormatter** is a strict PHP 8.1+ utility library that provides robust formatting for European postal codes, following official formatting standards country-by-country.\n\n\n## Features\n\n- Cleans and standardizes postal codes (removes spaces, symbols, lowercases)\n- Supports most of the **European countries** (45+ ISO 3166-1 alpha-2 codes)\n- Automatically formats codes to the standard of each country (e.g. `12345` → `123 45` for CZ, `sw1a1aa` → `SW1A 1AA` for GB)\n- Ready-to-go static formatter\n- Fully typed with strict mode (`declare(strict_types=1)`)\n- Includes PHPUnit and PHPStan support for testing and analysis\n\n\n## Installation\n\n```\ncomposer require labrodev/postal-formatter\n```\n\n## Usage\n\n```php\nuse Labrodev\\PostalFormatter\\Utilities\\PostalFormatter;\n\n// Default usage: just clean and normalize\necho PostalFormatter::format(' 12345 '); // \"12345\"\n\n// With country-specific formatting:\necho PostalFormatter::format('12345', 'CZ'); // \"123 45\"\necho PostalFormatter::format('sw1a1aa', 'GB'); // \"SW1A 1AA\"\necho PostalFormatter::format('1050', 'LV'); // \"LV-1050\"\n```\n\nList of available country codes you may find in CountryCode Enum (Labrodev/PostalFormatter/Enums/CountryCode).\n\n## Testing\n\nTo run tests:\n\n```\ncomposer install\ncomposer test\n```\n\n\n## Static Analysis\n\nTo run static analysis using PHPStan:\n\n```\ncomposer install\ncomposer analyse\n```\n\n\u003e Configuration is located in `phpstan.neon.dist`\n\n## Security\n\nIf you discover a security vulnerability within this package, **please contact us immediately at [contact@labrodev.com](mailto:contact@labrodev.com)**. All security-related issues will be handled privately and promptly.\n\n## Credits\n\nThis package is maintained by **Labrodev** — Laravel \u0026 PHP development studio.  \n[https://github.com/labrodev](https://github.com/labrodev)\n\n## Feedback\n\nIf you have any questions, suggestions, or have found an error — feel free to open an issue or contact us:  \n📬 **contact@labrodev.com**\n\n**License:** MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrodev%2Fpostal-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabrodev%2Fpostal-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabrodev%2Fpostal-formatter/lists"}