PHPackages                             ghaffaru/ghcities-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ghaffaru/ghcities-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ghaffaru/ghcities-php
=====================

PHP package for working with cities in ghana

1.1.0(3y ago)4232MITPHPPHP ^8.0

Since Feb 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/ghaffaru/ghcities-php)[ Packagist](https://packagist.org/packages/ghaffaru/ghcities-php)[ Docs](https://github.com/ghaffaru/ghcities-php)[ RSS](/packages/ghaffaru-ghcities-php/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

ghcities-php
============

[](#ghcities-php)

[![Latest Stable Version](https://camo.githubusercontent.com/182f55bfb5cb429cb165674f566abaa04eb44ff50fecc55bd07bf54fc90897c7/68747470733a2f2f706f7365722e707567782e6f72672f67686166666172752f67686369746965732d7068702f76)](//packagist.org/packages/ghaffaru/ghcities-php)[![Total Downloads](https://camo.githubusercontent.com/101c9618651487ac4aa631fe7d29e7438aa45776c72a6066e2fdf395113a4833/68747470733a2f2f706f7365722e707567782e6f72672f67686166666172752f67686369746965732d7068702f646f776e6c6f616473)](//packagist.org/packages/ghaffaru/ghcities-php)[![License](https://camo.githubusercontent.com/e872d939d6308459ff0d344cdff4c505ce31f9fd7c69bdb9bb432d33cee1af82/68747470733a2f2f706f7365722e707567782e6f72672f67686166666172752f67686369746965732d7068702f6c6963656e7365)](//packagist.org/packages/ghaffaru/ghcities-php)

A php package for working with cities in ghana !

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ghaffaru/ghcities-php
```

Usage
-----

[](#usage)

Get all Regions in ghana

```
$regions = \Ghaffaru\GhCities\Region::all();
```

Get all cities in Ghana

```
$cities = \Ghaffaru\GhCities\City::all();
```

Get Cities in a Region

```
$cities = \Ghaffaru\GhCities\Region::getCities('Ahafo');
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](./CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Oliver](https://github.com/codingoliver/ghana-cities) for compiling the cities.json file

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~481 days

Total

2

Last Release

1426d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e24b5c0cd9dd4242d551f464f1ed590a2905d1005a2c900f66809bf9652700f?d=identicon)[Ghaffaru15](/maintainers/Ghaffaru15)

---

Top Contributors

[![ghaffaru](https://avatars.githubusercontent.com/u/29246028?v=4)](https://github.com/ghaffaru "ghaffaru (12 commits)")[![hagios2](https://avatars.githubusercontent.com/u/31940634?v=4)](https://github.com/hagios2 "hagios2 (2 commits)")

---

Tags

ghaffarughana-cities

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ghaffaru-ghcities-php/health.svg)

```
[![Health](https://phpackages.com/badges/ghaffaru-ghcities-php/health.svg)](https://phpackages.com/packages/ghaffaru-ghcities-php)
```

###  Alternatives

[phpjuice/slopeone

PHP implementation of the Weighted Slope One rating-based collaborative filtering scheme.

868.7k](/packages/phpjuice-slopeone)[thisisbd/silverstripe-fontawesome-iconpickerfield

Font Awesome Icon Picker for SilverStripe 3.1.x based on http://mjolnic.com/fontawesome-iconpicker

143.3k1](/packages/thisisbd-silverstripe-fontawesome-iconpickerfield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
