babeuloula / adjacent-departments
Récupère la liste des départements limitrophes en fonction d'un département.
Installs: 12 672
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
Requires (Dev)
- babeuloula/phpcs: ^1.2
- phpstan/phpstan: ^0.12.29
- phpunit/phpunit: ^9.2
Suggests
- symfony/framework-bundle: Needed to use with bridge.
This package is auto-updated.
Last update: 2024-11-04 11:13:18 UTC
README
Récupère la liste des départements limitrophes en fonction d'un département.
Pré-requis
- PHP >=7.3
Installation
composer require babeuloula/adjacent-departments
Utilisation
use BaBeuloula\AdjacentDepartments\AdjacentDepartments; $adjacentDepartments = new AdjacentDepartments(); $adjacentDepartments->find('69'); // ['01','71','42','43','07','26','38'] $adjacentDepartments->isAdjacent('69', '75'); // false
Avec Symfony
use BaBeuloula\AdjacentDepartments\AdjacentDepartments; $container ->get(AdjacentDepartments::class) ->find('69'); // ['01','71','42','43','07','26','38'] $container ->get(AdjacentDepartments::class) ->isAdjacent('69', '75'); // false