Passed
Branch feature/2.1-geodispersion-dev (38d49e)
by Jonathan
04:17
created
src/Webtrees/Common/GeoDispersion/GeoAnalysis/GeoAnalysisResultItem.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -19,68 +19,68 @@
 block discarded – undo
19 19
  */
20 20
 class GeoAnalysisResultItem
21 21
 {
22
-    private GeoAnalysisPlace $place;
23
-    private int $count;
22
+	private GeoAnalysisPlace $place;
23
+	private int $count;
24 24
     
25
-    /**
26
-     * Constructor for GeoAnalysisResultItem
27
-     * 
28
-     * @param GeoAnalysisPlace $place
29
-     * @param int $count
30
-     */
31
-    public function __construct(GeoAnalysisPlace $place, int $count = 0)
32
-    {
33
-        $this->place = $place;
34
-        $this->count = $count;
35
-    }
25
+	/**
26
+	 * Constructor for GeoAnalysisResultItem
27
+	 * 
28
+	 * @param GeoAnalysisPlace $place
29
+	 * @param int $count
30
+	 */
31
+	public function __construct(GeoAnalysisPlace $place, int $count = 0)
32
+	{
33
+		$this->place = $place;
34
+		$this->count = $count;
35
+	}
36 36
     
37
-    /**
38
-     * Get the item key.
39
-     * 
40
-     * @return string
41
-     */
42
-    public function key(): string
43
-    {
44
-        return $this->place->key();
45
-    }
37
+	/**
38
+	 * Get the item key.
39
+	 * 
40
+	 * @return string
41
+	 */
42
+	public function key(): string
43
+	{
44
+		return $this->place->key();
45
+	}
46 46
     
47
-    /**
48
-     * Get the referenced GeoAnalysis Place
49
-     * 
50
-     * @return GeoAnalysisPlace
51
-     */
52
-    public function place(): GeoAnalysisPlace
53
-    {
54
-        return $this->place;
55
-    }
47
+	/**
48
+	 * Get the referenced GeoAnalysis Place
49
+	 * 
50
+	 * @return GeoAnalysisPlace
51
+	 */
52
+	public function place(): GeoAnalysisPlace
53
+	{
54
+		return $this->place;
55
+	}
56 56
     
57
-    /**
58
-     * Get the count of occurences of the GeoAnalysis Place in the analysis
59
-     * 
60
-     * @return int
61
-     */
62
-    public function count(): int
63
-    {
64
-        return $this->count;
65
-    }
57
+	/**
58
+	 * Get the count of occurences of the GeoAnalysis Place in the analysis
59
+	 * 
60
+	 * @return int
61
+	 */
62
+	public function count(): int
63
+	{
64
+		return $this->count;
65
+	}
66 66
     
67
-    /**
68
-     * Increment the count of occurrences of the GeoAnalysis Place in the analysis 
69
-     * 
70
-     * @return self
71
-     */
72
-    public function increment(): self
73
-    {
74
-        $this->count++;
75
-        return $this;
76
-    }
67
+	/**
68
+	 * Increment the count of occurrences of the GeoAnalysis Place in the analysis 
69
+	 * 
70
+	 * @return self
71
+	 */
72
+	public function increment(): self
73
+	{
74
+		$this->count++;
75
+		return $this;
76
+	}
77 77
     
78
-    /**
79
-     * Clone the item object
80
-     */
81
-    public function __clone()
82
-    {
83
-        $this->place = clone $this->place;
84
-    }
78
+	/**
79
+	 * Clone the item object
80
+	 */
81
+	public function __clone()
82
+	{
83
+		$this->place = clone $this->place;
84
+	}
85 85
 }
86 86
 
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/GeoAnalysis/GeoAnalysisPlace.php 3 patches
Indentation   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -27,132 +27,132 @@
 block discarded – undo
27 27
  */
28 28
 class GeoAnalysisPlace
29 29
 {
30
-    /**
31
-     * The default place name for invalid places
32
-     * @var string INVALID_PLACE
33
-     */
34
-    private const INVALID_PLACE = '##INVALID##';
30
+	/**
31
+	 * The default place name for invalid places
32
+	 * @var string INVALID_PLACE
33
+	 */
34
+	private const INVALID_PLACE = '##INVALID##';
35 35
     
36
-    private Place $place;
37
-    private int $depth;
38
-    private bool $strict_depth;
39
-    private bool $is_excluded;
36
+	private Place $place;
37
+	private int $depth;
38
+	private bool $strict_depth;
39
+	private bool $is_excluded;
40 40
     
41
-    /**
42
-     * Constructor for GeoAnalysisPlace
43
-     * 
44
-     * @param Tree $tree Default tree
45
-     * @param Place|null $place Place resulting from the analysis
46
-     * @param int $depth Place hierarchy depth defined by the geographical analysis view
47
-     * @param bool $strict_depth Checks whether places with a lower depth than defined should be flagged as invalid
48
-     */
49
-    public function __construct(Tree $tree, ?Place $place, int $depth, bool $strict_depth = false)
50
-    {
51
-        $this->depth = $depth;
52
-        $this->strict_depth = $strict_depth;
53
-        $this->place = $this->extractPlace($place, $depth, $strict_depth) ?? new Place('', $tree);
54
-        $this->is_excluded = false;
55
-    }
41
+	/**
42
+	 * Constructor for GeoAnalysisPlace
43
+	 * 
44
+	 * @param Tree $tree Default tree
45
+	 * @param Place|null $place Place resulting from the analysis
46
+	 * @param int $depth Place hierarchy depth defined by the geographical analysis view
47
+	 * @param bool $strict_depth Checks whether places with a lower depth than defined should be flagged as invalid
48
+	 */
49
+	public function __construct(Tree $tree, ?Place $place, int $depth, bool $strict_depth = false)
50
+	{
51
+		$this->depth = $depth;
52
+		$this->strict_depth = $strict_depth;
53
+		$this->place = $this->extractPlace($place, $depth, $strict_depth) ?? new Place('', $tree);
54
+		$this->is_excluded = false;
55
+	}
56 56
     
57
-    /**
58
-     * Process the provided Place to determine its status for further usage
59
-     * 
60
-     * @param Place|null $place
61
-     * @param int $depth
62
-     * @param bool $strict_depth
63
-     * @return Place|NULL
64
-     */
65
-    private function extractPlace(?Place $place, int $depth, bool $strict_depth): ?Place
66
-    {
67
-        if($place === null) return null;
68
-        if(mb_strlen($place->gedcomName()) === 0) return null;
69
-        $parts = $place->lastParts($depth);
70
-        if($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
71
-        return new Place($parts->implode(', '), $place->tree());
72
-    }
57
+	/**
58
+	 * Process the provided Place to determine its status for further usage
59
+	 * 
60
+	 * @param Place|null $place
61
+	 * @param int $depth
62
+	 * @param bool $strict_depth
63
+	 * @return Place|NULL
64
+	 */
65
+	private function extractPlace(?Place $place, int $depth, bool $strict_depth): ?Place
66
+	{
67
+		if($place === null) return null;
68
+		if(mb_strlen($place->gedcomName()) === 0) return null;
69
+		$parts = $place->lastParts($depth);
70
+		if($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
71
+		return new Place($parts->implode(', '), $place->tree());
72
+	}
73 73
     
74
-    /**
75
-     * Get the GeoAnalysis Place key
76
-     * 
77
-     * @return string
78
-     */
79
-    public function key(): string
80
-    {
81
-        return $this->place->gedcomName();
82
-    }
74
+	/**
75
+	 * Get the GeoAnalysis Place key
76
+	 * 
77
+	 * @return string
78
+	 */
79
+	public function key(): string
80
+	{
81
+		return $this->place->gedcomName();
82
+	}
83 83
     
84
-    /**
85
-     * Get the underlying Place object
86
-     * 
87
-     * @return Place
88
-     */
89
-    public function place(): Place
90
-    {
91
-        return $this->place;
92
-    }
84
+	/**
85
+	 * Get the underlying Place object
86
+	 * 
87
+	 * @return Place
88
+	 */
89
+	public function place(): Place
90
+	{
91
+		return $this->place;
92
+	}
93 93
     
94
-    /**
95
-     * Check if the GeoAnalysis Place is in the Known status
96
-     * 
97
-     * @return bool
98
-     */
99
-    public function isKnown(): bool
100
-    {
101
-        return !$this->isUnknown();
102
-    }
94
+	/**
95
+	 * Check if the GeoAnalysis Place is in the Known status
96
+	 * 
97
+	 * @return bool
98
+	 */
99
+	public function isKnown(): bool
100
+	{
101
+		return !$this->isUnknown();
102
+	}
103 103
     
104
-    /**
105
-     * Check if the GeoAnalysis Place is in the Unknown status
106
-     * 
107
-     * @return bool
108
-     */
109
-    public function isUnknown(): bool
110
-    {
111
-        return mb_strlen($this->place->gedcomName()) === 0;
112
-    }
104
+	/**
105
+	 * Check if the GeoAnalysis Place is in the Unknown status
106
+	 * 
107
+	 * @return bool
108
+	 */
109
+	public function isUnknown(): bool
110
+	{
111
+		return mb_strlen($this->place->gedcomName()) === 0;
112
+	}
113 113
     
114
-    /**
115
-     * Check if the GeoAnalysis Place is in the Invalid status
116
-     * 
117
-     * @return bool
118
-     */
119
-    public function isInvalid(): bool
120
-    {
121
-        return $this->place->gedcomName() === self::INVALID_PLACE;
122
-    }
114
+	/**
115
+	 * Check if the GeoAnalysis Place is in the Invalid status
116
+	 * 
117
+	 * @return bool
118
+	 */
119
+	public function isInvalid(): bool
120
+	{
121
+		return $this->place->gedcomName() === self::INVALID_PLACE;
122
+	}
123 123
     
124
-    /**
125
-     * Check if the GeoAnalysis Place is in the Excluded status
126
-     * 
127
-     * @return bool
128
-     */
129
-    public function isExcluded(): bool
130
-    {
131
-        return $this->isUnknown() || $this->isInvalid() || $this->is_excluded;
132
-    }
124
+	/**
125
+	 * Check if the GeoAnalysis Place is in the Excluded status
126
+	 * 
127
+	 * @return bool
128
+	 */
129
+	public function isExcluded(): bool
130
+	{
131
+		return $this->isUnknown() || $this->isInvalid() || $this->is_excluded;
132
+	}
133 133
     
134
-    /**
135
-     * Set the GeoAnalysis Place status to Found, if the parameter is true
136
-     * 
137
-     * @param bool $include
138
-     * @return self
139
-     */
140
-    public function include(bool $include = true): self
141
-    {
142
-        $this->is_excluded = !$include;
143
-        return $this;
144
-    }
134
+	/**
135
+	 * Set the GeoAnalysis Place status to Found, if the parameter is true
136
+	 * 
137
+	 * @param bool $include
138
+	 * @return self
139
+	 */
140
+	public function include(bool $include = true): self
141
+	{
142
+		$this->is_excluded = !$include;
143
+		return $this;
144
+	}
145 145
     
146
-    /**
147
-     * Set the GeoAnalysis Place status to Excluded, if the parameter is true
148
-     * 
149
-     * @param bool $exclude
150
-     * @return self
151
-     */
152
-    public function exclude(bool $exclude = true): self
153
-    {
154
-        $this->is_excluded = $exclude;
155
-        return $this;
156
-    }
146
+	/**
147
+	 * Set the GeoAnalysis Place status to Excluded, if the parameter is true
148
+	 * 
149
+	 * @param bool $exclude
150
+	 * @return self
151
+	 */
152
+	public function exclude(bool $exclude = true): self
153
+	{
154
+		$this->is_excluded = $exclude;
155
+		return $this;
156
+	}
157 157
 }
158 158
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
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) return null;
68
+        if (mb_strlen($place->gedcomName()) === 0) return null;
69 69
         $parts = $place->lastParts($depth);
70
-        if($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
70
+        if ($strict_depth && $parts->count() !== $depth) return new Place(self::INVALID_PLACE, $place->tree());
71 71
         return new Place($parts->implode(', '), $place->tree());
72 72
     }
73 73
     
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,10 +64,16 @@
 block discarded – undo
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
     
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Maps/SimpleFilesystemMap.php 3 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -26,61 +26,61 @@
 block discarded – undo
26 26
  */
27 27
 class SimpleFilesystemMap implements MapDefinitionInterface
28 28
 {
29
-    private string $id;
30
-    private string $title;
31
-    private string $path;
32
-    private FilesystemReader $filesystem;
29
+	private string $id;
30
+	private string $title;
31
+	private string $path;
32
+	private FilesystemReader $filesystem;
33 33
     
34
-    /**
35
-     * Constructor for SimpleFilesystemMap
36
-     * 
37
-     * @param string $id
38
-     * @param string $title
39
-     * @param FilesystemReader $filesystem
40
-     * @param string $path
41
-     */
42
-    public function __construct(string $id, string $title, FilesystemReader $filesystem, string $path)
43
-    {
44
-        $this->id = $id;
45
-        $this->title = $title;
46
-        $this->filesystem = $filesystem;
47
-        $this->path = $path;
48
-    }
34
+	/**
35
+	 * Constructor for SimpleFilesystemMap
36
+	 * 
37
+	 * @param string $id
38
+	 * @param string $title
39
+	 * @param FilesystemReader $filesystem
40
+	 * @param string $path
41
+	 */
42
+	public function __construct(string $id, string $title, FilesystemReader $filesystem, string $path)
43
+	{
44
+		$this->id = $id;
45
+		$this->title = $title;
46
+		$this->filesystem = $filesystem;
47
+		$this->path = $path;
48
+	}
49 49
     
50
-    /**
51
-     * {@inheritDoc}
52
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::id()
53
-     */
54
-    public function id(): string
55
-    {
56
-        return $this->id;
57
-    }
50
+	/**
51
+	 * {@inheritDoc}
52
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::id()
53
+	 */
54
+	public function id(): string
55
+	{
56
+		return $this->id;
57
+	}
58 58
 
59
-    /**
60
-     * {@inheritDoc}
61
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::title()
62
-     */
63
-    public function title(): string
64
-    {
65
-        return $this->title;
66
-    }
59
+	/**
60
+	 * {@inheritDoc}
61
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::title()
62
+	 */
63
+	public function title(): string
64
+	{
65
+		return $this->title;
66
+	}
67 67
     
68
-    /**
69
-     * {@inheritDoc}
70
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::features()
71
-     */
72
-    public function features(): array
73
-    {
74
-        $reader = new GeoJSONReader();
75
-        try {
76
-            $feature_collection = $reader->read($this->filesystem->read($this->path));
77
-            if($feature_collection instanceof FeatureCollection) {
78
-                return $feature_collection->getFeatures();
79
-            }
80
-        }
81
-        catch(Throwable $ex) { }
82
-        return [];
83
-    }
68
+	/**
69
+	 * {@inheritDoc}
70
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\MapDefinitionInterface::features()
71
+	 */
72
+	public function features(): array
73
+	{
74
+		$reader = new GeoJSONReader();
75
+		try {
76
+			$feature_collection = $reader->read($this->filesystem->read($this->path));
77
+			if($feature_collection instanceof FeatureCollection) {
78
+				return $feature_collection->getFeatures();
79
+			}
80
+		}
81
+		catch(Throwable $ex) { }
82
+		return [];
83
+	}
84 84
     
85 85
 
86 86
 }
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
         $reader = new GeoJSONReader();
75 75
         try {
76 76
             $feature_collection = $reader->read($this->filesystem->read($this->path));
77
-            if($feature_collection instanceof FeatureCollection) {
77
+            if ($feature_collection instanceof FeatureCollection) {
78 78
                 return $feature_collection->getFeatures();
79 79
             }
80 80
         }
81
-        catch(Throwable $ex) { }
81
+        catch (Throwable $ex) { }
82 82
         return [];
83 83
     }
84 84
     
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
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
     
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Config/GenericPlaceMapperConfig.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,10 +91,10 @@
 block discarded – undo
91 91
      */
92 92
     public function jsonDeserialize($config): self
93 93
     {
94
-        if(is_string($config)) {
94
+        if (is_string($config)) {
95 95
             return $this->jsonDeserialize(json_decode($config));
96 96
         }
97
-        if(is_array($config)) {
97
+        if (is_array($config)) {
98 98
             return $this->setConfig($config);
99 99
         }
100 100
         return $this;
Please login to merge, or discard this patch.
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -24,100 +24,100 @@
 block discarded – undo
24 24
  */
25 25
 class GenericPlaceMapperConfig implements PlaceMapperConfigInterface
26 26
 {
27
-    private array $config = [];
27
+	private array $config = [];
28 28
     
29
-    /**
30
-     * Get the generic mapper's config
31
-     * 
32
-     * @return array
33
-     */
34
-    public function config(): array
35
-    {
36
-        return $this->config;
37
-    }
29
+	/**
30
+	 * Get the generic mapper's config
31
+	 * 
32
+	 * @return array
33
+	 */
34
+	public function config(): array
35
+	{
36
+		return $this->config;
37
+	}
38 38
     
39
-    /**
40
-     * Set the generic mapper's config
41
-     * 
42
-     * @param array $config
43
-     * @return self
44
-     */
45
-    public function setConfig(array $config): self
46
-    {
47
-        $this->config = $config;
48
-        return $this;
49
-    }
39
+	/**
40
+	 * Set the generic mapper's config
41
+	 * 
42
+	 * @param array $config
43
+	 * @return self
44
+	 */
45
+	public function setConfig(array $config): self
46
+	{
47
+		$this->config = $config;
48
+		return $this;
49
+	}
50 50
     
51
-    /**
52
-     * {@inheritDoc}
53
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::get()
54
-     */
55
-    public function get(string $key, $default = null)
56
-    {
57
-        return $this->config[$key] ?? $default;
58
-    }
51
+	/**
52
+	 * {@inheritDoc}
53
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::get()
54
+	 */
55
+	public function get(string $key, $default = null)
56
+	{
57
+		return $this->config[$key] ?? $default;
58
+	}
59 59
 
60
-    /**
61
-     * {@inheritDoc}
62
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::has()
63
-     */
64
-    public function has(string $key): bool
65
-    {
66
-        return key_exists($key, $this->config);
67
-    }
60
+	/**
61
+	 * {@inheritDoc}
62
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::has()
63
+	 */
64
+	public function has(string $key): bool
65
+	{
66
+		return key_exists($key, $this->config);
67
+	}
68 68
     
69
-    /**
70
-     * {@inheritDoc}
71
-     * @see \JsonSerializable::jsonSerialize()
72
-     */
73
-    public function jsonSerialize()
74
-    {
75
-        return [
76
-            'class'     =>  get_class($this),
77
-            'config'    =>  $this->jsonSerializeConfig()
78
-        ];
79
-    }
69
+	/**
70
+	 * {@inheritDoc}
71
+	 * @see \JsonSerializable::jsonSerialize()
72
+	 */
73
+	public function jsonSerialize()
74
+	{
75
+		return [
76
+			'class'     =>  get_class($this),
77
+			'config'    =>  $this->jsonSerializeConfig()
78
+		];
79
+	}
80 80
     
81
-    /**
82
-     * Returns a representation of the mapper config compatible with Json serialisation
83
-     * 
84
-     * @return mixed
85
-     */
86
-    public function jsonSerializeConfig()
87
-    {
88
-        return $this->config;
89
-    }
81
+	/**
82
+	 * Returns a representation of the mapper config compatible with Json serialisation
83
+	 * 
84
+	 * @return mixed
85
+	 */
86
+	public function jsonSerializeConfig()
87
+	{
88
+		return $this->config;
89
+	}
90 90
 
91
-    /**
92
-     * {@inheritDoc}
93
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::jsonDeserialize()
94
-     */
95
-    public function jsonDeserialize($config): self
96
-    {
97
-        if(is_string($config)) {
98
-            return $this->jsonDeserialize(json_decode($config));
99
-        }
100
-        if(is_array($config)) {
101
-            return $this->setConfig($config);
102
-        }
103
-        return $this;
104
-    }
91
+	/**
92
+	 * {@inheritDoc}
93
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::jsonDeserialize()
94
+	 */
95
+	public function jsonDeserialize($config): self
96
+	{
97
+		if(is_string($config)) {
98
+			return $this->jsonDeserialize(json_decode($config));
99
+		}
100
+		if(is_array($config)) {
101
+			return $this->setConfig($config);
102
+		}
103
+		return $this;
104
+	}
105 105
     
106
-    /**
107
-     * {@inheritDoc}
108
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::configContent()
109
-     */
110
-    public function configContent(ModuleInterface $module, Tree $tree): string
111
-    {
112
-        return '';
113
-    }
106
+	/**
107
+	 * {@inheritDoc}
108
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::configContent()
109
+	 */
110
+	public function configContent(ModuleInterface $module, Tree $tree): string
111
+	{
112
+		return '';
113
+	}
114 114
     
115
-    /**
116
-     * {@inheritDoc}
117
-     * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::withConfigUpdate()
118
-     */
119
-    public function withConfigUpdate(ServerRequestInterface $request): self
120
-    {
121
-        return $this;
122
-    }
115
+	/**
116
+	 * {@inheritDoc}
117
+	 * @see \MyArtJaub\Webtrees\Contracts\GeoDispersion\PlaceMapperConfigInterface::withConfigUpdate()
118
+	 */
119
+	public function withConfigUpdate(ServerRequestInterface $request): self
120
+	{
121
+		return $this;
122
+	}
123 123
 }
124 124
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Common/GeoDispersion/Config/MapColorsConfig.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
     public function jsonSerialize()
65 65
     {
66 66
         return [
67
-            'default'   => (string) $this->defaultColor()->toHex(),
68
-            'stroke'    => (string) $this->strokeColor()->toHex(),
69
-            'maxvalue'  => (string) $this->maxValueColor()->toHex(),
70
-            'hover'     => (string) $this->hoverColor()->toHex(),
67
+            'default'   => (string)$this->defaultColor()->toHex(),
68
+            'stroke'    => (string)$this->strokeColor()->toHex(),
69
+            'maxvalue'  => (string)$this->maxValueColor()->toHex(),
70
+            'hover'     => (string)$this->hoverColor()->toHex(),
71 71
         ];
72 72
     }
73 73
 
Please login to merge, or discard this patch.
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -22,90 +22,90 @@
 block discarded – undo
22 22
  */
23 23
 class MapColorsConfig implements JsonSerializable
24 24
 {
25
-    private Color $default, $stroke, $max_value, $hover;
25
+	private Color $default, $stroke, $max_value, $hover;
26 26
     
27
-    /**
28
-     * Constructor for MapColorsConfig
29
-     * 
30
-     * @param Color $default
31
-     * @param Color $stroke
32
-     * @param Color $max_value
33
-     * @param Color $hover
34
-     */
35
-    public function __construct(
36
-        Color $default,
37
-        Color $stroke,
38
-        Color $max_value,
39
-        Color $hover
40
-    ) {
41
-        $this->default = $default;
42
-        $this->stroke = $stroke;
43
-        $this->max_value = $max_value;
44
-        $this->hover = $hover;
45
-    }
27
+	/**
28
+	 * Constructor for MapColorsConfig
29
+	 * 
30
+	 * @param Color $default
31
+	 * @param Color $stroke
32
+	 * @param Color $max_value
33
+	 * @param Color $hover
34
+	 */
35
+	public function __construct(
36
+		Color $default,
37
+		Color $stroke,
38
+		Color $max_value,
39
+		Color $hover
40
+	) {
41
+		$this->default = $default;
42
+		$this->stroke = $stroke;
43
+		$this->max_value = $max_value;
44
+		$this->hover = $hover;
45
+	}
46 46
     
47
-    /**
48
-     * Get the default color for the features
49
-     * 
50
-     * @return Color
51
-     */
52
-    public function defaultColor(): Color
53
-    {
54
-        return $this->default;
55
-    }
47
+	/**
48
+	 * Get the default color for the features
49
+	 * 
50
+	 * @return Color
51
+	 */
52
+	public function defaultColor(): Color
53
+	{
54
+		return $this->default;
55
+	}
56 56
     
57
-    /**
58
-     * Get the color for the features' strokes
59
-     * 
60
-     * @return Color
61
-     */
62
-    public function strokeColor(): Color
63
-    {
64
-        return $this->stroke;
65
-    }
57
+	/**
58
+	 * Get the color for the features' strokes
59
+	 * 
60
+	 * @return Color
61
+	 */
62
+	public function strokeColor(): Color
63
+	{
64
+		return $this->stroke;
65
+	}
66 66
     
67
-    /**
68
-     * Get the color for the features with the lowest count 
69
-     * 
70
-     * @return Color
71
-     */
72
-    public function minValueColor(): Color
73
-    {
74
-        return new Rgb(255, 255, 255);
75
-    }
67
+	/**
68
+	 * Get the color for the features with the lowest count 
69
+	 * 
70
+	 * @return Color
71
+	 */
72
+	public function minValueColor(): Color
73
+	{
74
+		return new Rgb(255, 255, 255);
75
+	}
76 76
     
77
-    /**
78
-     * Get the color for the features with the highest count 
79
-     * 
80
-     * @return Color
81
-     */
82
-    public function maxValueColor(): Color
83
-    {
84
-        return $this->max_value;
85
-    }
77
+	/**
78
+	 * Get the color for the features with the highest count 
79
+	 * 
80
+	 * @return Color
81
+	 */
82
+	public function maxValueColor(): Color
83
+	{
84
+		return $this->max_value;
85
+	}
86 86
     
87
-    /**
88
-     * Get the color for feature hovering
89
-     * 
90
-     * @return Color
91
-     */
92
-    public function hoverColor(): Color
93
-    {
94
-        return $this->hover;
95
-    }
87
+	/**
88
+	 * Get the color for feature hovering
89
+	 * 
90
+	 * @return Color
91
+	 */
92
+	public function hoverColor(): Color
93
+	{
94
+		return $this->hover;
95
+	}
96 96
 
97
-    /**
98
-     * {@inheritDoc}
99
-     * @see JsonSerializable::jsonSerialize()
100
-     */
101
-    public function jsonSerialize()
102
-    {
103
-        return [
104
-            'default'   => (string) $this->defaultColor()->toHex(),
105
-            'stroke'    => (string) $this->strokeColor()->toHex(),
106
-            'maxvalue'  => (string) $this->maxValueColor()->toHex(),
107
-            'hover'     => (string) $this->hoverColor()->toHex(),
108
-        ];
109
-    }
97
+	/**
98
+	 * {@inheritDoc}
99
+	 * @see JsonSerializable::jsonSerialize()
100
+	 */
101
+	public function jsonSerialize()
102
+	{
103
+		return [
104
+			'default'   => (string) $this->defaultColor()->toHex(),
105
+			'stroke'    => (string) $this->strokeColor()->toHex(),
106
+			'maxvalue'  => (string) $this->maxValueColor()->toHex(),
107
+			'hover'     => (string) $this->hoverColor()->toHex(),
108
+		];
109
+	}
110 110
 
111 111
 }
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Contracts/GeoDispersion/ModulePlaceMapperProviderInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
 interface ModulePlaceMapperProviderInterface
21 21
 {
22
-    /**
23
-     * List place mappers provided by the module as an array.
24
-     *
25
-     * @return string[] List of place mappers
26
-     */
27
-    public function listPlaceMappers(): array;
22
+	/**
23
+	 * List place mappers provided by the module as an array.
24
+	 *
25
+	 * @return string[] List of place mappers
26
+	 */
27
+	public function listPlaceMappers(): array;
28 28
 }
Please login to merge, or discard this patch.
src/Webtrees/Contracts/GeoDispersion/MapViewConfigInterface.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -18,26 +18,26 @@
 block discarded – undo
18 18
  */
19 19
 interface MapViewConfigInterface
20 20
 {
21
-    /**
22
-     * Get the feature property to be used for mapping the map feature with the analysis results
23
-     * 
24
-     * @return string
25
-     */
26
-    function mapMappingProperty(): string;
21
+	/**
22
+	 * Get the feature property to be used for mapping the map feature with the analysis results
23
+	 * 
24
+	 * @return string
25
+	 */
26
+	function mapMappingProperty(): string;
27 27
 
28
-    /**
29
-     * Get the config of the mapper associated with the map view
30
-     * 
31
-     * @return PlaceMapperConfigInterface
32
-     */
33
-    function mapperConfig(): PlaceMapperConfigInterface;
28
+	/**
29
+	 * Get the config of the mapper associated with the map view
30
+	 * 
31
+	 * @return PlaceMapperConfigInterface
32
+	 */
33
+	function mapperConfig(): PlaceMapperConfigInterface;
34 34
     
35
-    /**
36
-     * Get a MapViewConfigInterface object with the new properties
37
-     * 
38
-     * @param string $mapping_property
39
-     * @param PlaceMapperConfigInterface $mapper_config
40
-     * @return self
41
-     */
42
-    function with(string $mapping_property, PlaceMapperConfigInterface $mapper_config): self;
35
+	/**
36
+	 * Get a MapViewConfigInterface object with the new properties
37
+	 * 
38
+	 * @param string $mapping_property
39
+	 * @param PlaceMapperConfigInterface $mapper_config
40
+	 * @return self
41
+	 */
42
+	function with(string $mapping_property, PlaceMapperConfigInterface $mapper_config): self;
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
src/Webtrees/Contracts/GeoDispersion/ModuleGeoAnalysisProviderInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
20 20
 interface ModuleGeoAnalysisProviderInterface
21 21
 {
22 22
 
23
-    /**
24
-     * List geographical analyses provided by the module as an array.
25
-     *
26
-     * @return string[] List of geographical analyses
27
-     */
28
-    public function listGeoAnalyses(): array;
23
+	/**
24
+	 * List geographical analyses provided by the module as an array.
25
+	 *
26
+	 * @return string[] List of geographical analyses
27
+	 */
28
+	public function listGeoAnalyses(): array;
29 29
 }
Please login to merge, or discard this patch.
src/Webtrees/Contracts/GeoDispersion/PlaceMapperInterface.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -21,54 +21,54 @@
 block discarded – undo
21 21
  */
22 22
 interface PlaceMapperInterface
23 23
 {
24
-    /**
25
-     * Get the Place mapper title
26
-     * 
27
-     * @return string
28
-     */
29
-    function title(): string;
24
+	/**
25
+	 * Get the Place mapper title
26
+	 * 
27
+	 * @return string
28
+	 */
29
+	function title(): string;
30 30
     
31
-    /**
32
-     * Boot the Place mapper
33
-     */
34
-    function boot(): void;
31
+	/**
32
+	 * Boot the Place mapper
33
+	 */
34
+	function boot(): void;
35 35
     
36
-    /**
37
-     * Get the configuration associated to the mapper
38
-     * 
39
-     * @return PlaceMapperConfigInterface
40
-     */
41
-    function config(): PlaceMapperConfigInterface;
36
+	/**
37
+	 * Get the configuration associated to the mapper
38
+	 * 
39
+	 * @return PlaceMapperConfigInterface
40
+	 */
41
+	function config(): PlaceMapperConfigInterface;
42 42
     
43
-    /**
44
-     * Set the configured associated to the mapper
45
-     * 
46
-     * @param PlaceMapperConfigInterface $config
47
-     */
48
-    function setConfig(PlaceMapperConfigInterface $config): void;
43
+	/**
44
+	 * Set the configured associated to the mapper
45
+	 * 
46
+	 * @param PlaceMapperConfigInterface $config
47
+	 */
48
+	function setConfig(PlaceMapperConfigInterface $config): void;
49 49
     
50
-    /**
51
-     * Get the data associated to the mapper, for a specific key
52
-     * 
53
-     * @param string $key
54
-     * @return null|mixed
55
-     */
56
-    function data(string $key);
50
+	/**
51
+	 * Get the data associated to the mapper, for a specific key
52
+	 * 
53
+	 * @param string $key
54
+	 * @return null|mixed
55
+	 */
56
+	function data(string $key);
57 57
     
58
-    /**
59
-     * Set the data associated to the mapper, for a specific key
60
-     * 
61
-     * @param string $key
62
-     * @param mixed $data
63
-     */
64
-    function setData(string $key, $data): void;
58
+	/**
59
+	 * Set the data associated to the mapper, for a specific key
60
+	 * 
61
+	 * @param string $key
62
+	 * @param mixed $data
63
+	 */
64
+	function setData(string $key, $data): void;
65 65
     
66
-    /**
67
-     * Return the property value of the feature identifying a place in a GeoJson map.
68
-     * 
69
-     * @param Place $place
70
-     * @param string $feature_property
71
-     * @return string|NULL
72
-     */
73
-    function map(Place $place, string $feature_property) : ?string;
66
+	/**
67
+	 * Return the property value of the feature identifying a place in a GeoJson map.
68
+	 * 
69
+	 * @param Place $place
70
+	 * @param string $feature_property
71
+	 * @return string|NULL
72
+	 */
73
+	function map(Place $place, string $feature_property) : ?string;
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.