@@ -29,6 +29,9 @@ discard block |
||
| 29 | 29 | return preg_replace("/[^a-z0-9]/", "", $value); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $type |
|
| 34 | + */ |
|
| 32 | 35 | protected function addToIndex($type, $value, $key) { |
| 33 | 36 | $this->index[$type][$this->slugify($value)] = $key; |
| 34 | 37 | } |
@@ -89,6 +92,9 @@ discard block |
||
| 89 | 92 | return $this->regions->get($regionCode)->getOrElse(null); |
| 90 | 93 | } |
| 91 | 94 | |
| 95 | + /** |
|
| 96 | + * @param Map $collection |
|
| 97 | + */ |
|
| 92 | 98 | protected function sortByValue($collection) { |
| 93 | 99 | $collator = new \Collator('fr_FR'); |
| 94 | 100 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Departements\Model\Region; |
| 6 | 6 | use Departements\Model\Departement; |
| 7 | 7 | use Departements\Model\Commune; |
| 8 | - |
|
| 9 | 8 | use PhpCollection\Sequence; |
| 10 | 9 | |
| 11 | 10 | class JsonDatasource extends AbstractDatasource implements DatasourceInterface |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Departements\Datasource\DatasourceInterface; |
| 6 | 6 | |
| 7 | -use PhpCollection\Map; |
|
| 8 | - |
|
| 9 | 7 | class Provider |
| 10 | 8 | { |
| 11 | 9 | private $datasource; |