Passed
Push — feature/code-analysis ( e321b8...2d8a51 )
by Jonathan
13:14 queued 09:07
created
app/Common/GeoDispersion/GeoAnalysis/GeoAnalysisResults.php 1 patch
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -23,104 +23,104 @@
 block discarded – undo
23 23
  */
24 24
 class GeoAnalysisResults
25 25
 {
26
-    private GeoAnalysisResult $global;
26
+	private GeoAnalysisResult $global;
27 27
 
28
-    /**
29
-     * @var Collection<string, GeoAnalysisResult> $detailed
30
-     */
31
-    private Collection $detailed;
28
+	/**
29
+	 * @var Collection<string, GeoAnalysisResult> $detailed
30
+	 */
31
+	private Collection $detailed;
32 32
 
33
-    /**
34
-     * Constructor for GeoAnalysisResults
35
-     */
36
-    public function __construct()
37
-    {
38
-        $this->global = new GeoAnalysisResult('Global', 0);
39
-        $this->detailed = new Collection();
40
-    }
33
+	/**
34
+	 * Constructor for GeoAnalysisResults
35
+	 */
36
+	public function __construct()
37
+	{
38
+		$this->global = new GeoAnalysisResult('Global', 0);
39
+		$this->detailed = new Collection();
40
+	}
41 41
 
42
-    /**
43
-     * Global result of the geographical analysis
44
-     *
45
-     * @return GeoAnalysisResult
46
-     */
47
-    public function global(): GeoAnalysisResult
48
-    {
49
-        return $this->global;
50
-    }
42
+	/**
43
+	 * Global result of the geographical analysis
44
+	 *
45
+	 * @return GeoAnalysisResult
46
+	 */
47
+	public function global(): GeoAnalysisResult
48
+	{
49
+		return $this->global;
50
+	}
51 51
 
52
-    /**
53
-     * List of results by category of the geographical analysis
54
-     *
55
-     * @return Collection<string, GeoAnalysisResult>
56
-     */
57
-    public function detailed(): Collection
58
-    {
59
-        return $this->detailed;
60
-    }
52
+	/**
53
+	 * List of results by category of the geographical analysis
54
+	 *
55
+	 * @return Collection<string, GeoAnalysisResult>
56
+	 */
57
+	public function detailed(): Collection
58
+	{
59
+		return $this->detailed;
60
+	}
61 61
 
62
-    /**
63
-     * List of results by category of the geographical analysis.
64
-     * The list is sorted first by the category order, then by the category description
65
-     *
66
-     * @return Collection<string, GeoAnalysisResult>
67
-     */
68
-    public function sortedDetailed(): Collection
69
-    {
70
-        return $this->detailed->sortBy([
71
-            fn(GeoAnalysisResult $a, GeoAnalysisResult $b): int => $a->order() <=> $b->order(),
72
-            fn(GeoAnalysisResult $a, GeoAnalysisResult $b): int =>
73
-                I18N::comparator()($a->description(), $b->description())
74
-        ]);
75
-    }
62
+	/**
63
+	 * List of results by category of the geographical analysis.
64
+	 * The list is sorted first by the category order, then by the category description
65
+	 *
66
+	 * @return Collection<string, GeoAnalysisResult>
67
+	 */
68
+	public function sortedDetailed(): Collection
69
+	{
70
+		return $this->detailed->sortBy([
71
+			fn(GeoAnalysisResult $a, GeoAnalysisResult $b): int => $a->order() <=> $b->order(),
72
+			fn(GeoAnalysisResult $a, GeoAnalysisResult $b): int =>
73
+				I18N::comparator()($a->description(), $b->description())
74
+		]);
75
+	}
76 76
 
77
-    /**
78
-     * Add a GeoAnalysis Place to the global result
79
-     *
80
-     * @param GeoAnalysisPlace $place
81
-     */
82
-    public function addPlace(GeoAnalysisPlace $place): void
83
-    {
84
-        $this->global()->addPlace($place);
85
-    }
77
+	/**
78
+	 * Add a GeoAnalysis Place to the global result
79
+	 *
80
+	 * @param GeoAnalysisPlace $place
81
+	 */
82
+	public function addPlace(GeoAnalysisPlace $place): void
83
+	{
84
+		$this->global()->addPlace($place);
85
+	}
86 86
 
87
-    /**
88
-     * Add a new category to the list of results, if it does not exist yet
89
-     *
90
-     * @param string $description
91
-     * @param int $order
92
-     */
93
-    public function addCategory(string $description, int $order): void
94
-    {
95
-        if (!$this->detailed->has($description)) {
96
-            $this->detailed->put($description, new GeoAnalysisResult($description, $order));
97
-        }
98
-    }
87
+	/**
88
+	 * Add a new category to the list of results, if it does not exist yet
89
+	 *
90
+	 * @param string $description
91
+	 * @param int $order
92
+	 */
93
+	public function addCategory(string $description, int $order): void
94
+	{
95
+		if (!$this->detailed->has($description)) {
96
+			$this->detailed->put($description, new GeoAnalysisResult($description, $order));
97
+		}
98
+	}
99 99
 
100
-    /**
101
-     * Add a GeoAnalysis Place to a category result, if the category exist.
102
-     *
103
-     * @param string $category_name
104
-     * @param GeoAnalysisPlace $place
105
-     */
106
-    public function addPlaceInCreatedCategory(string $category_name, GeoAnalysisPlace $place): void
107
-    {
108
-        if ($this->detailed->has($category_name)) {
109
-            $this->detailed->get($category_name)->addPlace($place);
110
-        }
111
-    }
100
+	/**
101
+	 * Add a GeoAnalysis Place to a category result, if the category exist.
102
+	 *
103
+	 * @param string $category_name
104
+	 * @param GeoAnalysisPlace $place
105
+	 */
106
+	public function addPlaceInCreatedCategory(string $category_name, GeoAnalysisPlace $place): void
107
+	{
108
+		if ($this->detailed->has($category_name)) {
109
+			$this->detailed->get($category_name)->addPlace($place);
110
+		}
111
+	}
112 112
 
113
-    /**
114
-     * Add a GeoAnalysis Place to a category result, after creating the category if it does not exist.
115
-     *
116
-     * @param string $category_name
117
-     * @param GeoAnalysisPlace $place
118
-     */
119
-    public function addPlaceInCategory(string $category_name, int $category_order, GeoAnalysisPlace $place): void
120
-    {
121
-        if (!$this->detailed->has($category_name)) {
122
-            $this->addCategory($category_name, $category_order);
123
-        }
124
-        $this->addPlaceInCreatedCategory($category_name, $place);
125
-    }
113
+	/**
114
+	 * Add a GeoAnalysis Place to a category result, after creating the category if it does not exist.
115
+	 *
116
+	 * @param string $category_name
117
+	 * @param GeoAnalysisPlace $place
118
+	 */
119
+	public function addPlaceInCategory(string $category_name, int $category_order, GeoAnalysisPlace $place): void
120
+	{
121
+		if (!$this->detailed->has($category_name)) {
122
+			$this->addCategory($category_name, $category_order);
123
+		}
124
+		$this->addPlaceInCreatedCategory($category_name, $place);
125
+	}
126 126
 }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Views/GeoAnalysisTable.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -22,51 +22,51 @@
 block discarded – undo
22 22
 
23 23
 class GeoAnalysisTable extends AbstractGeoAnalysisView
24 24
 {
25
-    /**
26
-     * {@inheritDoc}
27
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::type()
28
-     */
29
-    public function type(): string
30
-    {
31
-        return I18N::translateContext('GEODISPERSION', 'Table');
32
-    }
25
+	/**
26
+	 * {@inheritDoc}
27
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::type()
28
+	 */
29
+	public function type(): string
30
+	{
31
+		return I18N::translateContext('GEODISPERSION', 'Table');
32
+	}
33 33
 
34
-    /**
35
-     * {@inheritDoc}
36
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon()
37
-     */
38
-    public function icon(ModuleInterface $module): string
39
-    {
40
-        return view($module->name() . '::icons/view-table', ['type' => $this->type()]);
41
-    }
34
+	/**
35
+	 * {@inheritDoc}
36
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon()
37
+	 */
38
+	public function icon(ModuleInterface $module): string
39
+	{
40
+		return view($module->name() . '::icons/view-table', ['type' => $this->type()]);
41
+	}
42 42
 
43
-    /**
44
-     * {@inheritDoc}
45
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent()
46
-     */
47
-    public function globalSettingsContent(ModuleInterface $module): string
48
-    {
49
-        return '';
50
-    }
43
+	/**
44
+	 * {@inheritDoc}
45
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent()
46
+	 */
47
+	public function globalSettingsContent(ModuleInterface $module): string
48
+	{
49
+		return '';
50
+	}
51 51
 
52
-    /**
53
-     * {@inheritDoc}
54
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate()
55
-     * @return $this
56
-     */
57
-    public function withGlobalSettingsUpdate(ServerRequestInterface $request): self
58
-    {
59
-        return $this;
60
-    }
52
+	/**
53
+	 * {@inheritDoc}
54
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate()
55
+	 * @return $this
56
+	 */
57
+	public function withGlobalSettingsUpdate(ServerRequestInterface $request): self
58
+	{
59
+		return $this;
60
+	}
61 61
 
62
-    /**
63
-     * {@inheritDoc}
64
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent()
65
-     */
66
-    public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string
67
-    {
68
-        return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [
69
-            'result'    =>  $result
70
-        ]);
71
-    }
62
+	/**
63
+	 * {@inheritDoc}
64
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent()
65
+	 */
66
+	public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string
67
+	{
68
+		return view($module->name() . '::geoanalysisview-tab-glb-table', $params + [
69
+			'result'    =>  $result
70
+		]);
71
+	}
72 72
 }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Views/AbstractGeoAnalysisView.php 1 patch
Indentation   +220 added lines, -220 removed lines patch added patch discarded remove patch
@@ -27,224 +27,224 @@
 block discarded – undo
27 27
  */
28 28
 abstract class AbstractGeoAnalysisView
29 29
 {
30
-    private int $id;
31
-    private Tree $tree;
32
-    private bool $enabled;
33
-    private string $description;
34
-    private GeoAnalysisInterface $geoanalysis;
35
-    private int $depth;
36
-    private int $detailed_top_places;
37
-    private bool $use_flags;
38
-
39
-    /**
40
-     * Constructor for AbstractGeoAnalysisView
41
-     *
42
-     * @param int $id
43
-     * @param Tree $tree
44
-     * @param bool $enabled
45
-     * @param string $description
46
-     * @param GeoAnalysisInterface $geoanalysis
47
-     * @param int $depth
48
-     * @param int $detailed_top_places
49
-     * @param bool $use_flags
50
-     */
51
-    final public function __construct(
52
-        int $id,
53
-        Tree $tree,
54
-        bool $enabled,
55
-        string $description,
56
-        GeoAnalysisInterface $geoanalysis,
57
-        int $depth,
58
-        int $detailed_top_places = 0,
59
-        bool $use_flags = false
60
-    ) {
61
-        $this->id = $id;
62
-        $this->tree = $tree;
63
-        $this->enabled = $enabled;
64
-        $this->description = $description;
65
-        $this->geoanalysis = $geoanalysis;
66
-        $this->depth = $depth;
67
-        $this->detailed_top_places = $detailed_top_places;
68
-        $this->use_flags = $use_flags;
69
-    }
70
-
71
-    /**
72
-     * Create a copy of the view with a new ID.
73
-     *
74
-     * @param int $id
75
-     * @return static
76
-     */
77
-    public function withId(int $id): self
78
-    {
79
-        $new = clone $this;
80
-        $new->id = $id;
81
-        return $new;
82
-    }
83
-
84
-    /**
85
-     * Create a copy of the view with new properties.
86
-     *
87
-     * @param bool $enabled
88
-     * @param string $description
89
-     * @param GeoAnalysisInterface $geoanalysis
90
-     * @param int $depth
91
-     * @param int $detailed_top_places
92
-     * @param bool $use_flags
93
-     * @return static
94
-     */
95
-    public function with(
96
-        bool $enabled,
97
-        string $description,
98
-        GeoAnalysisInterface $geoanalysis,
99
-        int $depth,
100
-        int $detailed_top_places = 0,
101
-        bool $use_flags = false
102
-    ): self {
103
-        $new = clone $this;
104
-        $new->enabled = $enabled;
105
-        $new->description = $description;
106
-        $new->geoanalysis = $geoanalysis;
107
-        $new->depth = $depth;
108
-        $new->detailed_top_places = $detailed_top_places;
109
-        $new->use_flags = $use_flags;
110
-        return $new;
111
-    }
112
-
113
-    /**
114
-     * Get the view ID
115
-     *
116
-     * @return int
117
-     */
118
-    public function id(): int
119
-    {
120
-        return $this->id;
121
-    }
122
-
123
-    /**
124
-     * Get the view type for display
125
-     *
126
-     * @return string
127
-     */
128
-    abstract public function type(): string;
129
-
130
-    /**
131
-     * Get the icon for the view type
132
-     *
133
-     * @param ModuleInterface $module
134
-     * @return string
135
-     */
136
-    abstract public function icon(ModuleInterface $module): string;
137
-
138
-    /**
139
-     * Return the content of the global settings section of the config page
140
-     *
141
-     * @param ModuleInterface $module
142
-     * @return string
143
-     */
144
-    abstract public function globalSettingsContent(ModuleInterface $module): string;
145
-
146
-    /**
147
-     * Return a view with global settings updated according to the view rules
148
-     *
149
-     * @param ServerRequestInterface $request
150
-     * @return static
151
-     */
152
-    abstract public function withGlobalSettingsUpdate(ServerRequestInterface $request): self;
153
-
154
-    /**
155
-     * Returns the content of the view global tab
156
-     *
157
-     * @param GeoDispersionModule $module
158
-     * @param GeoAnalysisResult $result
159
-     * @param array<string, mixed> $params
160
-     * @return string
161
-     */
162
-    abstract public function globalTabContent(
163
-        GeoDispersionModule $module,
164
-        GeoAnalysisResult $result,
165
-        array $params
166
-    ): string;
167
-
168
-    /**
169
-     * Returns the content of the view detailed tab
170
-     *
171
-     * @param ModuleInterface $module
172
-     * @param Collection<string, GeoAnalysisResult> $results
173
-     * @param array<string, mixed> $params
174
-     * @return string
175
-     */
176
-    public function detailedTabContent(ModuleInterface $module, Collection $results, array $params): string
177
-    {
178
-        return view($module->name() . '::geoanalysisview-tab-detailed', $params + [ 'results'   =>  $results ]);
179
-    }
180
-
181
-    /**
182
-     * Get the tree to which the view belongs
183
-     *
184
-     * @return Tree
185
-     */
186
-    public function tree(): Tree
187
-    {
188
-        return $this->tree;
189
-    }
190
-
191
-    /**
192
-     * Get the description of the view
193
-     *
194
-     * @return string
195
-     */
196
-    public function description(): string
197
-    {
198
-        return $this->description;
199
-    }
200
-
201
-    /**
202
-     * Get whether the view is enabled
203
-     *
204
-     * @return bool
205
-     */
206
-    public function isEnabled(): bool
207
-    {
208
-        return $this->enabled;
209
-    }
210
-
211
-    /**
212
-     * Get the geographical dispersion analysis for the view
213
-     *
214
-     * @return GeoAnalysisInterface
215
-     */
216
-    public function analysis(): GeoAnalysisInterface
217
-    {
218
-        return $this->geoanalysis;
219
-    }
220
-
221
-    /**
222
-     * Get the place hierarchy depth for the view
223
-     *
224
-     * @return int
225
-     */
226
-    public function placesDepth(): int
227
-    {
228
-        return $this->depth;
229
-    }
230
-
231
-    /**
232
-     * Get the number of places to display in the detailed tab
233
-     *
234
-     * @return int
235
-     */
236
-    public function numberTopPlaces(): int
237
-    {
238
-        return $this->detailed_top_places;
239
-    }
240
-
241
-    /**
242
-     * Get whether flags should be used in the detailed tab
243
-     *
244
-     * @return bool
245
-     */
246
-    public function useFlags(): bool
247
-    {
248
-        return $this->use_flags;
249
-    }
30
+	private int $id;
31
+	private Tree $tree;
32
+	private bool $enabled;
33
+	private string $description;
34
+	private GeoAnalysisInterface $geoanalysis;
35
+	private int $depth;
36
+	private int $detailed_top_places;
37
+	private bool $use_flags;
38
+
39
+	/**
40
+	 * Constructor for AbstractGeoAnalysisView
41
+	 *
42
+	 * @param int $id
43
+	 * @param Tree $tree
44
+	 * @param bool $enabled
45
+	 * @param string $description
46
+	 * @param GeoAnalysisInterface $geoanalysis
47
+	 * @param int $depth
48
+	 * @param int $detailed_top_places
49
+	 * @param bool $use_flags
50
+	 */
51
+	final public function __construct(
52
+		int $id,
53
+		Tree $tree,
54
+		bool $enabled,
55
+		string $description,
56
+		GeoAnalysisInterface $geoanalysis,
57
+		int $depth,
58
+		int $detailed_top_places = 0,
59
+		bool $use_flags = false
60
+	) {
61
+		$this->id = $id;
62
+		$this->tree = $tree;
63
+		$this->enabled = $enabled;
64
+		$this->description = $description;
65
+		$this->geoanalysis = $geoanalysis;
66
+		$this->depth = $depth;
67
+		$this->detailed_top_places = $detailed_top_places;
68
+		$this->use_flags = $use_flags;
69
+	}
70
+
71
+	/**
72
+	 * Create a copy of the view with a new ID.
73
+	 *
74
+	 * @param int $id
75
+	 * @return static
76
+	 */
77
+	public function withId(int $id): self
78
+	{
79
+		$new = clone $this;
80
+		$new->id = $id;
81
+		return $new;
82
+	}
83
+
84
+	/**
85
+	 * Create a copy of the view with new properties.
86
+	 *
87
+	 * @param bool $enabled
88
+	 * @param string $description
89
+	 * @param GeoAnalysisInterface $geoanalysis
90
+	 * @param int $depth
91
+	 * @param int $detailed_top_places
92
+	 * @param bool $use_flags
93
+	 * @return static
94
+	 */
95
+	public function with(
96
+		bool $enabled,
97
+		string $description,
98
+		GeoAnalysisInterface $geoanalysis,
99
+		int $depth,
100
+		int $detailed_top_places = 0,
101
+		bool $use_flags = false
102
+	): self {
103
+		$new = clone $this;
104
+		$new->enabled = $enabled;
105
+		$new->description = $description;
106
+		$new->geoanalysis = $geoanalysis;
107
+		$new->depth = $depth;
108
+		$new->detailed_top_places = $detailed_top_places;
109
+		$new->use_flags = $use_flags;
110
+		return $new;
111
+	}
112
+
113
+	/**
114
+	 * Get the view ID
115
+	 *
116
+	 * @return int
117
+	 */
118
+	public function id(): int
119
+	{
120
+		return $this->id;
121
+	}
122
+
123
+	/**
124
+	 * Get the view type for display
125
+	 *
126
+	 * @return string
127
+	 */
128
+	abstract public function type(): string;
129
+
130
+	/**
131
+	 * Get the icon for the view type
132
+	 *
133
+	 * @param ModuleInterface $module
134
+	 * @return string
135
+	 */
136
+	abstract public function icon(ModuleInterface $module): string;
137
+
138
+	/**
139
+	 * Return the content of the global settings section of the config page
140
+	 *
141
+	 * @param ModuleInterface $module
142
+	 * @return string
143
+	 */
144
+	abstract public function globalSettingsContent(ModuleInterface $module): string;
145
+
146
+	/**
147
+	 * Return a view with global settings updated according to the view rules
148
+	 *
149
+	 * @param ServerRequestInterface $request
150
+	 * @return static
151
+	 */
152
+	abstract public function withGlobalSettingsUpdate(ServerRequestInterface $request): self;
153
+
154
+	/**
155
+	 * Returns the content of the view global tab
156
+	 *
157
+	 * @param GeoDispersionModule $module
158
+	 * @param GeoAnalysisResult $result
159
+	 * @param array<string, mixed> $params
160
+	 * @return string
161
+	 */
162
+	abstract public function globalTabContent(
163
+		GeoDispersionModule $module,
164
+		GeoAnalysisResult $result,
165
+		array $params
166
+	): string;
167
+
168
+	/**
169
+	 * Returns the content of the view detailed tab
170
+	 *
171
+	 * @param ModuleInterface $module
172
+	 * @param Collection<string, GeoAnalysisResult> $results
173
+	 * @param array<string, mixed> $params
174
+	 * @return string
175
+	 */
176
+	public function detailedTabContent(ModuleInterface $module, Collection $results, array $params): string
177
+	{
178
+		return view($module->name() . '::geoanalysisview-tab-detailed', $params + [ 'results'   =>  $results ]);
179
+	}
180
+
181
+	/**
182
+	 * Get the tree to which the view belongs
183
+	 *
184
+	 * @return Tree
185
+	 */
186
+	public function tree(): Tree
187
+	{
188
+		return $this->tree;
189
+	}
190
+
191
+	/**
192
+	 * Get the description of the view
193
+	 *
194
+	 * @return string
195
+	 */
196
+	public function description(): string
197
+	{
198
+		return $this->description;
199
+	}
200
+
201
+	/**
202
+	 * Get whether the view is enabled
203
+	 *
204
+	 * @return bool
205
+	 */
206
+	public function isEnabled(): bool
207
+	{
208
+		return $this->enabled;
209
+	}
210
+
211
+	/**
212
+	 * Get the geographical dispersion analysis for the view
213
+	 *
214
+	 * @return GeoAnalysisInterface
215
+	 */
216
+	public function analysis(): GeoAnalysisInterface
217
+	{
218
+		return $this->geoanalysis;
219
+	}
220
+
221
+	/**
222
+	 * Get the place hierarchy depth for the view
223
+	 *
224
+	 * @return int
225
+	 */
226
+	public function placesDepth(): int
227
+	{
228
+		return $this->depth;
229
+	}
230
+
231
+	/**
232
+	 * Get the number of places to display in the detailed tab
233
+	 *
234
+	 * @return int
235
+	 */
236
+	public function numberTopPlaces(): int
237
+	{
238
+		return $this->detailed_top_places;
239
+	}
240
+
241
+	/**
242
+	 * Get whether flags should be used in the detailed tab
243
+	 *
244
+	 * @return bool
245
+	 */
246
+	public function useFlags(): bool
247
+	{
248
+		return $this->use_flags;
249
+	}
250 250
 }
Please login to merge, or discard this patch.
app/Contracts/Tasks/ConfigurableTaskInterface.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,20 +22,20 @@
 block discarded – undo
22 22
  */
23 23
 interface ConfigurableTaskInterface
24 24
 {
25
-    /**
26
-     * Returns the HTML code to display the specific task configuration.
27
-     *
28
-     * @param ServerRequestInterface $request
29
-     * @return string HTML code
30
-     */
31
-    public function configView(ServerRequestInterface $request): string;
25
+	/**
26
+	 * Returns the HTML code to display the specific task configuration.
27
+	 *
28
+	 * @param ServerRequestInterface $request
29
+	 * @return string HTML code
30
+	 */
31
+	public function configView(ServerRequestInterface $request): string;
32 32
 
33
-    /**
34
-     * Update the specific configuration of the task.
35
-     *
36
-     * @param ServerRequestInterface $request
37
-     * @param TaskSchedule $task_schedule
38
-     * @return bool Result of the update
39
-     */
40
-    public function updateConfig(ServerRequestInterface $request, TaskSchedule $task_schedule): bool;
33
+	/**
34
+	 * Update the specific configuration of the task.
35
+	 *
36
+	 * @param ServerRequestInterface $request
37
+	 * @param TaskSchedule $task_schedule
38
+	 * @return bool Result of the update
39
+	 */
40
+	public function updateConfig(ServerRequestInterface $request, TaskSchedule $task_schedule): bool;
41 41
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Schema/Migration0.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
  */
22 22
 class Migration0 implements MigrationInterface
23 23
 {
24
-    /**
25
-     * {@inheritDoc}
26
-     * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
-     */
28
-    public function upgrade(): void
29
-    {
30
-        // These migrations have been merged into migration 2.
31
-    }
24
+	/**
25
+	 * {@inheritDoc}
26
+	 * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
+	 */
28
+	public function upgrade(): void
29
+	{
30
+		// These migrations have been merged into migration 2.
31
+	}
32 32
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Schema/Migration2.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -23,41 +23,41 @@
 block discarded – undo
23 23
  */
24 24
 class Migration2 implements MigrationInterface
25 25
 {
26
-    /**
27
-     * {@inheritDoc}
28
-     * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
29
-     */
30
-    public function upgrade(): void
31
-    {
32
-        $in_transaction = DB::connection()->getPdo()->inTransaction();
33
-
34
-        // Clean up previous sosa table if it exists
35
-        DB::schema()->dropIfExists('maj_sosa');
36
-
37
-        DB::schema()->create('maj_sosa', static function (Blueprint $table): void {
38
-
39
-            $table->integer('majs_gedcom_id');
40
-            $table->integer('majs_user_id')->default(-1);
41
-            $table->bigInteger('majs_sosa')->unsigned(); // Allow to calculate sosa on 64 generations
42
-            $table->string('majs_i_id', 20);
43
-            $table->tinyInteger('majs_gen')->nullable();
44
-            $table->smallInteger('majs_birth_year')->nullable();
45
-            $table->smallInteger('majs_birth_year_est')->nullable();
46
-            $table->smallInteger('majs_death_year')->nullable();
47
-            $table->smallInteger('majs_death_year_est')->nullable();
48
-
49
-            $table->primary(['majs_gedcom_id', 'majs_user_id', 'majs_sosa']);
50
-
51
-            $table->index(['majs_gedcom_id', 'majs_user_id']);
52
-            $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_i_id']);
53
-            $table->index(['majs_gedcom_id', 'majs_user_id', 'majs_gen']);
54
-
55
-            $table->foreign('majs_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
56
-            $table->foreign('majs_user_id')->references('user_id')->on('user')->onDelete('cascade');
57
-        });
58
-
59
-        if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) {
60
-            DB::connection()->beginTransaction();
61
-        }
62
-    }
26
+	/**
27
+	 * {@inheritDoc}
28
+	 * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
29
+	 */
30
+	public function upgrade(): void
31
+	{
32
+		$in_transaction = DB::connection()->getPdo()->inTransaction();
33
+
34
+		// Clean up previous sosa table if it exists
35
+		DB::schema()->dropIfExists('maj_sosa');
36
+
37
+		DB::schema()->create('maj_sosa', static function (Blueprint $table): void {
38
+
39
+			$table->integer('majs_gedcom_id');
40
+			$table->integer('majs_user_id')->default(-1);
41
+			$table->bigInteger('majs_sosa')->unsigned(); // Allow to calculate sosa on 64 generations
42
+			$table->string('majs_i_id', 20);
43
+			$table->tinyInteger('majs_gen')->nullable();
44
+			$table->smallInteger('majs_birth_year')->nullable();
45
+			$table->smallInteger('majs_birth_year_est')->nullable();
46
+			$table->smallInteger('majs_death_year')->nullable();
47
+			$table->smallInteger('majs_death_year_est')->nullable();
48
+
49
+			$table->primary(['majs_gedcom_id', 'majs_user_id', 'majs_sosa']);
50
+
51
+			$table->index(['majs_gedcom_id', 'majs_user_id']);
52
+			$table->index(['majs_gedcom_id', 'majs_user_id', 'majs_i_id']);
53
+			$table->index(['majs_gedcom_id', 'majs_user_id', 'majs_gen']);
54
+
55
+			$table->foreign('majs_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
56
+			$table->foreign('majs_user_id')->references('user_id')->on('user')->onDelete('cascade');
57
+		});
58
+
59
+		if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) {
60
+			DB::connection()->beginTransaction();
61
+		}
62
+	}
63 63
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Schema/Migration1.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
  */
22 22
 class Migration1 implements MigrationInterface
23 23
 {
24
-    /**
25
-     * {@inheritDoc}
26
-     * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
-     */
28
-    public function upgrade(): void
29
-    {
30
-        // These migrations have been merged into migration 2.
31
-    }
24
+	/**
25
+	 * {@inheritDoc}
26
+	 * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
+	 */
28
+	public function upgrade(): void
29
+	{
30
+		// These migrations have been merged into migration 2.
31
+	}
32 32
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/SosaStatistics.php 1 patch
Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -38,142 +38,142 @@
 block discarded – undo
38 38
  */
39 39
 class SosaStatistics implements RequestHandlerInterface
40 40
 {
41
-    use ViewResponseTrait;
42
-
43
-    private ?SosaModule $module;
44
-    private RelationshipService $relationship_service;
45
-
46
-    /**
47
-     * Constructor for AncestorsList Request Handler
48
-     *
49
-     * @param ModuleService $module_service
50
-     */
51
-    public function __construct(ModuleService $module_service, RelationshipService $relationship_service)
52
-    {
53
-        $this->module = $module_service->findByInterface(SosaModule::class)->first();
54
-        $this->relationship_service = $relationship_service;
55
-    }
56
-
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
60
-     */
61
-    public function handle(ServerRequestInterface $request): ResponseInterface
62
-    {
63
-        if ($this->module === null) {
64
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
65
-        }
66
-
67
-        $tree = Validator::attributes($request)->tree();
68
-        $user = Auth::check() ? Validator::attributes($request)->user() : new DefaultUser();
69
-
70
-        /** @var SosaStatisticsService $sosa_stats_service */
71
-        $sosa_stats_service = app()->makeWith(SosaStatisticsService::class, ['tree' => $tree, 'user' => $user]);
72
-
73
-        return $this->viewResponse($this->module->name() . '::statistics-page', [
74
-            'module_name'       =>  $this->module->name(),
75
-            'title'             =>  I18N::translate('Sosa Statistics'),
76
-            'tree'              =>  $tree,
77
-            'theme'             =>  app(ModuleThemeInterface::class),
78
-            'root_indi'         =>  $sosa_stats_service->rootIndividual(),
79
-            'general_stats'     =>  $this->statisticsGeneral($sosa_stats_service),
80
-            'generation_stats'  =>  $this->statisticsByGenerations($sosa_stats_service),
81
-            'generation_depth'  =>  $sosa_stats_service->generationDepthStatsAtGeneration(1)->first(),
82
-            'multiple_sosas'    =>  $sosa_stats_service->topMultipleAncestorsWithNoTies(10)->groupBy('sosa_count'),
83
-            'sosa_dispersion_g2' =>  $sosa_stats_service->ancestorsDispersionForGeneration(2),
84
-            'sosa_dispersion_g3' =>  $sosa_stats_service->ancestorsDispersionForGeneration(3),
85
-            'gen_depth_g3'      =>  $sosa_stats_service->generationDepthStatsAtGeneration(3),
86
-            'relationship_service'  =>  $this->relationship_service,
87
-        ]);
88
-    }
89
-
90
-    /**
91
-     * Retrieve and compute the global statistics of ancestors for the tree.
92
-     * Statistics include the number of ancestors, the number of different ancestors, pedigree collapse...
93
-     *
94
-     * @param SosaStatisticsService $sosa_stats_service
95
-     * @return array<string, int|float>
96
-     */
97
-    private function statisticsGeneral(SosaStatisticsService $sosa_stats_service): array
98
-    {
99
-        $ancestors_count = $sosa_stats_service->totalAncestors();
100
-        $ancestors_distinct_count = $sosa_stats_service->totalDistinctAncestors();
101
-        $individual_count = $sosa_stats_service->totalIndividuals();
102
-
103
-        return [
104
-            'sosa_count'    =>  $ancestors_count,
105
-            'distinct_count'    =>  $ancestors_distinct_count,
106
-            'sosa_rate' =>  $this->safeDivision(
107
-                BigInteger::of($ancestors_distinct_count),
108
-                BigInteger::of($individual_count)
109
-            ),
110
-            'mean_gen_time'         =>  $sosa_stats_service->meanGenerationTime()
111
-        ];
112
-    }
113
-
114
-    /**
115
-     * Retrieve and compute the statistics of ancestors by generations.
116
-     * Statistics include the number of ancestors, the number of different ancestors, cumulative statistics...
117
-     *
118
-     * @param SosaStatisticsService $sosa_stats_service
119
-     * @return array<int, array<string, int|float>>
120
-     */
121
-    private function statisticsByGenerations(SosaStatisticsService $sosa_stats_service): array
122
-    {
123
-        $stats_by_gen = $sosa_stats_service->statisticsByGenerations();
124
-
125
-        $generation_stats = array();
126
-
127
-        foreach ($stats_by_gen as $gen => $stats_gen) {
128
-            $gen_diff = $gen > 1 ?
129
-                (int) $stats_gen['diffSosaTotalCount'] - (int) $stats_by_gen[$gen - 1]['diffSosaTotalCount'] :
130
-                1;
131
-            $generation_stats[$gen] = array(
132
-                'gen_min_birth' => $stats_gen['firstBirth'] ?? (int) $stats_gen['firstEstimatedBirth'],
133
-                'gen_max_birth' => $stats_gen['lastBirth'] ?? (int) $stats_gen['lastEstimatedBirth'],
134
-                'theoretical' => BigInteger::of(2)->power($gen - 1)->toInt(),
135
-                'known' => (int) $stats_gen['sosaCount'],
136
-                'perc_known' => $this->safeDivision(
137
-                    BigInteger::of((int) $stats_gen['sosaCount']),
138
-                    BigInteger::of(2)->power($gen - 1)
139
-                ),
140
-                'missing' => $gen > 1 ?
141
-                    2 * (int) $stats_by_gen[$gen - 1]['sosaCount'] - (int) $stats_gen['sosaCount'] :
142
-                    0,
143
-                'perc_missing' => $gen > 1 ?
144
-                    1 - $this->safeDivision(
145
-                        BigInteger::of((int) $stats_gen['sosaCount']),
146
-                        BigInteger::of(2 * (int) $stats_by_gen[$gen - 1]['sosaCount'])
147
-                    ) :
148
-                    0,
149
-                'total_known' => (int) $stats_gen['sosaTotalCount'],
150
-                'perc_total_known' => $this->safeDivision(
151
-                    BigInteger::of((int) $stats_gen['sosaTotalCount']),
152
-                    BigInteger::of(2)->power($gen)->minus(1)
153
-                ),
154
-                'different' => $gen_diff,
155
-                'perc_different' => $this->safeDivision(
156
-                    BigInteger::of($gen_diff),
157
-                    BigInteger::of((int) $stats_gen['sosaCount'])
158
-                ),
159
-                'total_different' => (int) $stats_gen['diffSosaTotalCount']
160
-            );
161
-        }
162
-
163
-        return $generation_stats;
164
-    }
165
-
166
-    /**
167
-     * Return the result of a division, and a default value if denominator is 0
168
-     *
169
-     * @param BigInteger $p Numerator
170
-     * @param BigInteger $q Denominator
171
-     * @param int $scale Rounding scale
172
-     * @param float $default Value if denominator is 0
173
-     * @return float
174
-     */
175
-    private function safeDivision(BigInteger $p, BigInteger $q, int $scale = 10, float $default = 0): float
176
-    {
177
-        return $q->isZero() ? $default : $p->toBigDecimal()->dividedBy($q, $scale, RoundingMode::HALF_DOWN)->toFloat();
178
-    }
41
+	use ViewResponseTrait;
42
+
43
+	private ?SosaModule $module;
44
+	private RelationshipService $relationship_service;
45
+
46
+	/**
47
+	 * Constructor for AncestorsList Request Handler
48
+	 *
49
+	 * @param ModuleService $module_service
50
+	 */
51
+	public function __construct(ModuleService $module_service, RelationshipService $relationship_service)
52
+	{
53
+		$this->module = $module_service->findByInterface(SosaModule::class)->first();
54
+		$this->relationship_service = $relationship_service;
55
+	}
56
+
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
60
+	 */
61
+	public function handle(ServerRequestInterface $request): ResponseInterface
62
+	{
63
+		if ($this->module === null) {
64
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
65
+		}
66
+
67
+		$tree = Validator::attributes($request)->tree();
68
+		$user = Auth::check() ? Validator::attributes($request)->user() : new DefaultUser();
69
+
70
+		/** @var SosaStatisticsService $sosa_stats_service */
71
+		$sosa_stats_service = app()->makeWith(SosaStatisticsService::class, ['tree' => $tree, 'user' => $user]);
72
+
73
+		return $this->viewResponse($this->module->name() . '::statistics-page', [
74
+			'module_name'       =>  $this->module->name(),
75
+			'title'             =>  I18N::translate('Sosa Statistics'),
76
+			'tree'              =>  $tree,
77
+			'theme'             =>  app(ModuleThemeInterface::class),
78
+			'root_indi'         =>  $sosa_stats_service->rootIndividual(),
79
+			'general_stats'     =>  $this->statisticsGeneral($sosa_stats_service),
80
+			'generation_stats'  =>  $this->statisticsByGenerations($sosa_stats_service),
81
+			'generation_depth'  =>  $sosa_stats_service->generationDepthStatsAtGeneration(1)->first(),
82
+			'multiple_sosas'    =>  $sosa_stats_service->topMultipleAncestorsWithNoTies(10)->groupBy('sosa_count'),
83
+			'sosa_dispersion_g2' =>  $sosa_stats_service->ancestorsDispersionForGeneration(2),
84
+			'sosa_dispersion_g3' =>  $sosa_stats_service->ancestorsDispersionForGeneration(3),
85
+			'gen_depth_g3'      =>  $sosa_stats_service->generationDepthStatsAtGeneration(3),
86
+			'relationship_service'  =>  $this->relationship_service,
87
+		]);
88
+	}
89
+
90
+	/**
91
+	 * Retrieve and compute the global statistics of ancestors for the tree.
92
+	 * Statistics include the number of ancestors, the number of different ancestors, pedigree collapse...
93
+	 *
94
+	 * @param SosaStatisticsService $sosa_stats_service
95
+	 * @return array<string, int|float>
96
+	 */
97
+	private function statisticsGeneral(SosaStatisticsService $sosa_stats_service): array
98
+	{
99
+		$ancestors_count = $sosa_stats_service->totalAncestors();
100
+		$ancestors_distinct_count = $sosa_stats_service->totalDistinctAncestors();
101
+		$individual_count = $sosa_stats_service->totalIndividuals();
102
+
103
+		return [
104
+			'sosa_count'    =>  $ancestors_count,
105
+			'distinct_count'    =>  $ancestors_distinct_count,
106
+			'sosa_rate' =>  $this->safeDivision(
107
+				BigInteger::of($ancestors_distinct_count),
108
+				BigInteger::of($individual_count)
109
+			),
110
+			'mean_gen_time'         =>  $sosa_stats_service->meanGenerationTime()
111
+		];
112
+	}
113
+
114
+	/**
115
+	 * Retrieve and compute the statistics of ancestors by generations.
116
+	 * Statistics include the number of ancestors, the number of different ancestors, cumulative statistics...
117
+	 *
118
+	 * @param SosaStatisticsService $sosa_stats_service
119
+	 * @return array<int, array<string, int|float>>
120
+	 */
121
+	private function statisticsByGenerations(SosaStatisticsService $sosa_stats_service): array
122
+	{
123
+		$stats_by_gen = $sosa_stats_service->statisticsByGenerations();
124
+
125
+		$generation_stats = array();
126
+
127
+		foreach ($stats_by_gen as $gen => $stats_gen) {
128
+			$gen_diff = $gen > 1 ?
129
+				(int) $stats_gen['diffSosaTotalCount'] - (int) $stats_by_gen[$gen - 1]['diffSosaTotalCount'] :
130
+				1;
131
+			$generation_stats[$gen] = array(
132
+				'gen_min_birth' => $stats_gen['firstBirth'] ?? (int) $stats_gen['firstEstimatedBirth'],
133
+				'gen_max_birth' => $stats_gen['lastBirth'] ?? (int) $stats_gen['lastEstimatedBirth'],
134
+				'theoretical' => BigInteger::of(2)->power($gen - 1)->toInt(),
135
+				'known' => (int) $stats_gen['sosaCount'],
136
+				'perc_known' => $this->safeDivision(
137
+					BigInteger::of((int) $stats_gen['sosaCount']),
138
+					BigInteger::of(2)->power($gen - 1)
139
+				),
140
+				'missing' => $gen > 1 ?
141
+					2 * (int) $stats_by_gen[$gen - 1]['sosaCount'] - (int) $stats_gen['sosaCount'] :
142
+					0,
143
+				'perc_missing' => $gen > 1 ?
144
+					1 - $this->safeDivision(
145
+						BigInteger::of((int) $stats_gen['sosaCount']),
146
+						BigInteger::of(2 * (int) $stats_by_gen[$gen - 1]['sosaCount'])
147
+					) :
148
+					0,
149
+				'total_known' => (int) $stats_gen['sosaTotalCount'],
150
+				'perc_total_known' => $this->safeDivision(
151
+					BigInteger::of((int) $stats_gen['sosaTotalCount']),
152
+					BigInteger::of(2)->power($gen)->minus(1)
153
+				),
154
+				'different' => $gen_diff,
155
+				'perc_different' => $this->safeDivision(
156
+					BigInteger::of($gen_diff),
157
+					BigInteger::of((int) $stats_gen['sosaCount'])
158
+				),
159
+				'total_different' => (int) $stats_gen['diffSosaTotalCount']
160
+			);
161
+		}
162
+
163
+		return $generation_stats;
164
+	}
165
+
166
+	/**
167
+	 * Return the result of a division, and a default value if denominator is 0
168
+	 *
169
+	 * @param BigInteger $p Numerator
170
+	 * @param BigInteger $q Denominator
171
+	 * @param int $scale Rounding scale
172
+	 * @param float $default Value if denominator is 0
173
+	 * @return float
174
+	 */
175
+	private function safeDivision(BigInteger $p, BigInteger $q, int $scale = 10, float $default = 0): float
176
+	{
177
+		return $q->isZero() ? $default : $p->toBigDecimal()->dividedBy($q, $scale, RoundingMode::HALF_DOWN)->toFloat();
178
+	}
179 179
 }
Please login to merge, or discard this patch.
app/Module/Sosa/Http/RequestHandlers/AncestorsList.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -34,48 +34,48 @@
 block discarded – undo
34 34
  */
35 35
 class AncestorsList implements RequestHandlerInterface
36 36
 {
37
-    use ViewResponseTrait;
37
+	use ViewResponseTrait;
38 38
 
39
-    private ?SosaModule $module;
39
+	private ?SosaModule $module;
40 40
 
41
-    /**
42
-     * Constructor for AncestorsList Request Handler
43
-     *
44
-     * @param ModuleService $module_service
45
-     */
46
-    public function __construct(ModuleService $module_service)
47
-    {
48
-        $this->module = $module_service->findByInterface(SosaModule::class)->first();
49
-    }
41
+	/**
42
+	 * Constructor for AncestorsList Request Handler
43
+	 *
44
+	 * @param ModuleService $module_service
45
+	 */
46
+	public function __construct(ModuleService $module_service)
47
+	{
48
+		$this->module = $module_service->findByInterface(SosaModule::class)->first();
49
+	}
50 50
 
51
-    /**
52
-     * {@inheritDoc}
53
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
54
-     */
55
-    public function handle(ServerRequestInterface $request): ResponseInterface
56
-    {
57
-        if ($this->module === null) {
58
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
59
-        }
51
+	/**
52
+	 * {@inheritDoc}
53
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
54
+	 */
55
+	public function handle(ServerRequestInterface $request): ResponseInterface
56
+	{
57
+		if ($this->module === null) {
58
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
59
+		}
60 60
 
61
-        $tree = Validator::attributes($request)->tree();
62
-        $user = Auth::check() ? Validator::attributes($request)->user() : new DefaultUser();
61
+		$tree = Validator::attributes($request)->tree();
62
+		$user = Auth::check() ? Validator::attributes($request)->user() : new DefaultUser();
63 63
 
64
-        /** @var SosaStatisticsService $sosa_stats_service */
65
-        $sosa_stats_service = app()->makeWith(SosaStatisticsService::class, ['tree' => $tree, 'user' => $user]);
64
+		/** @var SosaStatisticsService $sosa_stats_service */
65
+		$sosa_stats_service = app()->makeWith(SosaStatisticsService::class, ['tree' => $tree, 'user' => $user]);
66 66
 
67
-        $current_gen = Validator::queryParams($request)->integer(
68
-            'gen',
69
-            Validator::attributes($request)->integer('gen', 0)
70
-        );
67
+		$current_gen = Validator::queryParams($request)->integer(
68
+			'gen',
69
+			Validator::attributes($request)->integer('gen', 0)
70
+		);
71 71
 
72
-        return $this->viewResponse($this->module->name() . '::list-ancestors-page', [
73
-            'module_name'       =>  $this->module->name(),
74
-            'title'             =>  I18N::translate('Sosa Ancestors'),
75
-            'tree'              =>  $tree,
76
-            'root_indi'         =>  $sosa_stats_service->rootIndividual(),
77
-            'max_gen'           =>  $sosa_stats_service->maxGeneration(),
78
-            'current_gen'       =>  $current_gen
79
-        ]);
80
-    }
72
+		return $this->viewResponse($this->module->name() . '::list-ancestors-page', [
73
+			'module_name'       =>  $this->module->name(),
74
+			'title'             =>  I18N::translate('Sosa Ancestors'),
75
+			'tree'              =>  $tree,
76
+			'root_indi'         =>  $sosa_stats_service->rootIndividual(),
77
+			'max_gen'           =>  $sosa_stats_service->maxGeneration(),
78
+			'current_gen'       =>  $current_gen
79
+		]);
80
+	}
81 81
 }
Please login to merge, or discard this patch.