@@ -64,10 +64,16 @@ |
||
64 | 64 | */ |
65 | 65 | private function extractPlace(?Place $place, int $depth, bool $strict_depth): ?Place |
66 | 66 | { |
67 | - if($place === null) return null; |
|
68 | - if(mb_strlen($place->gedcomName()) === 0) return null; |
|
67 | + if($place === null) { |
|
68 | + return null; |
|
69 | + } |
|
70 | + if(mb_strlen($place->gedcomName()) === 0) { |
|
71 | + return null; |
|
72 | + } |
|
69 | 73 | $parts = $place->lastParts($depth); |
70 | - if($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree()); |
|
74 | + if($strict_depth && $parts->count() !== $depth) { |
|
75 | + return new Place(self::INVALID_PLACE, $place->tree()); |
|
76 | + } |
|
71 | 77 | return new Place($parts->implode(', '), $place->tree()); |
72 | 78 | } |
73 | 79 |
@@ -77,8 +77,7 @@ |
||
77 | 77 | if($feature_collection instanceof FeatureCollection) { |
78 | 78 | return $feature_collection->getFeatures(); |
79 | 79 | } |
80 | - } |
|
81 | - catch(Throwable $ex) { } |
|
80 | + } catch(Throwable $ex) { } |
|
82 | 81 | return []; |
83 | 82 | } |
84 | 83 |