igzard/huncity-php

Searchable hungarian city list PHP library with zip code

v1.0.2 2025-01-14 21:59 UTC

This package is auto-updated.

Last update: 2025-01-14 22:12:52 UTC


README

EN: 🌐 Searchable hungarian city list - PHP library

HU: 🌐 Kereshető magyar városlista - PHP könyvtár

Tests passed Total Downloads Latest Version

English 🇬🇧

Requires PHP 8.3+

Getting started

composer require igzard/huncity-php

Usage

Search by city name

use Igzard\HuncityPhp\CitySearcher;

require __DIR__.'/../vendor/autoload.php';

$searcher = new CitySearcher();
$cities = $searcher->find('Bu');

Search by zipcode

    
use Igzard\HuncityPhp\CitySearcher;

require __DIR__.'/../vendor/autoload.php';

$searcher = (new CitySearcher())->findBy(new Igzard\HuncityPhp\Service\Search\Zipcode());
$zipcodes = $searcher->find('2194');

Magyar 🇭🇺

Szükséges PHP 8.3+

Telepítés

composer require igzard/huncity-php

Használat

Városnév alapján keresés

use Igzard\HuncityPhp\CitySearcher;

require __DIR__.'/../vendor/autoload.php';

$searcher = new CitySearcher();
$cities = $searcher->find('Bu');

Irányítószám alapján keresés

    
use Igzard\HuncityPhp\CitySearcher;

require __DIR__.'/../vendor/autoload.php';

$searcher = (new CitySearcher())->findBy(new Igzard\HuncityPhp\Service\Search\Zipcode());
$zipcodes = $searcher->find('2194');

Contributing

If you want to contribute to this project and make it better, your help is very welcome.

🚀 Install dependencies with composer:

make composer-install

✅ Run Code quality check:

make code-quality

👷 Run PHPUnit tests:

make phpunit

🎨 Run php-cs-fixer:

make cs-fix

🔥 Run phpstan:

make phpstan

Huncity PHP was created by Gergely Ignácz under the MIT license.