@@ 64-74 (lines=11) @@ | ||
61 | return $this->departements->get($departementCode)->getOrElse(null); |
|
62 | } |
|
63 | ||
64 | public function findDepartementByName($departementName) { |
|
65 | $departementName = $this->slugify($departementName); |
|
66 | ||
67 | if(!isset($this->index['departements'][$departementName])) { |
|
68 | return null; |
|
69 | } |
|
70 | ||
71 | $departementCode = $this->index['departements'][$departementName]; |
|
72 | ||
73 | return $this->departements->get($departementCode)->get(); |
|
74 | } |
|
75 | ||
76 | public function findRegionByName($regionName) { |
|
77 | $regionName = $this->slugify($regionName); |
|
@@ 76-86 (lines=11) @@ | ||
73 | return $this->departements->get($departementCode)->get(); |
|
74 | } |
|
75 | ||
76 | public function findRegionByName($regionName) { |
|
77 | $regionName = $this->slugify($regionName); |
|
78 | ||
79 | if(!isset($this->index['regions'][$regionName])) { |
|
80 | return null; |
|
81 | } |
|
82 | ||
83 | $regionCode = $this->index['regions'][$regionName]; |
|
84 | ||
85 | return $this->regions->get($regionCode)->get(); |
|
86 | } |
|
87 | ||
88 | public function findRegionByCode($regionCode) { |
|
89 | return $this->regions->get($regionCode)->getOrElse(null); |