Passed
Push — main ( 9fcb9f...c808ff )
by Jonathan
04:18
created
app/Module/PatronymicLineage/Model/LineageRootNode.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -23,68 +23,68 @@
 block discarded – undo
23 23
  */
24 24
 class LineageRootNode extends LineageNode
25 25
 {
26
-    /**
27
-     * @var Collection<string, int> $places Places for the lineage node
28
-     */
29
-    private $places;
26
+	/**
27
+	 * @var Collection<string, int> $places Places for the lineage node
28
+	 */
29
+	private $places;
30 30
 
31
-    /**
32
-     * @var int $nb_children Number of node childs
33
-     */
34
-    private $nb_children;
31
+	/**
32
+	 * @var int $nb_children Number of node childs
33
+	 */
34
+	private $nb_children;
35 35
 
36
-    /**
37
-     * Constructor for LineageRootNode
38
-     *
39
-     * @param Individual|null $node_indi
40
-     */
41
-    public function __construct(?Individual $node_indi = null)
42
-    {
43
-        parent::__construct($node_indi, $this);
44
-        $this->places = new Collection();
45
-        $this->nb_children = 0;
46
-    }
36
+	/**
37
+	 * Constructor for LineageRootNode
38
+	 *
39
+	 * @param Individual|null $node_indi
40
+	 */
41
+	public function __construct(?Individual $node_indi = null)
42
+	{
43
+		parent::__construct($node_indi, $this);
44
+		$this->places = new Collection();
45
+		$this->nb_children = 0;
46
+	}
47 47
 
48
-    /**
49
-     * Adds a place to the list of lineage's place
50
-     *
51
-     * @param Place $place
52
-     */
53
-    public function addPlace(Place $place): void
54
-    {
55
-        $place_name = $place->gedcomName();
56
-        if (mb_strlen($place_name) > 0) {
57
-            $this->places->put($place_name, $this->places->get($place_name, 0) + 1);
58
-        }
59
-    }
48
+	/**
49
+	 * Adds a place to the list of lineage's place
50
+	 *
51
+	 * @param Place $place
52
+	 */
53
+	public function addPlace(Place $place): void
54
+	{
55
+		$place_name = $place->gedcomName();
56
+		if (mb_strlen($place_name) > 0) {
57
+			$this->places->put($place_name, $this->places->get($place_name, 0) + 1);
58
+		}
59
+	}
60 60
 
61
-    /**
62
-     * Returns the number of child nodes.
63
-     * This number is more to be used as indication rather than an accurate one.
64
-     *
65
-     * @return int
66
-     */
67
-    public function numberChildNodes(): int
68
-    {
69
-        return $this->nb_children;
70
-    }
61
+	/**
62
+	 * Returns the number of child nodes.
63
+	 * This number is more to be used as indication rather than an accurate one.
64
+	 *
65
+	 * @return int
66
+	 */
67
+	public function numberChildNodes(): int
68
+	{
69
+		return $this->nb_children;
70
+	}
71 71
 
72
-    /**
73
-     * Increments the number of child nodes by one
74
-     *
75
-     */
76
-    public function incrementChildNodes(): void
77
-    {
78
-        $this->nb_children++;
79
-    }
72
+	/**
73
+	 * Increments the number of child nodes by one
74
+	 *
75
+	 */
76
+	public function incrementChildNodes(): void
77
+	{
78
+		$this->nb_children++;
79
+	}
80 80
 
81
-    /**
82
-     * Returns the list of place for the lineage
83
-     *
84
-     * @return Collection<string, int>
85
-     */
86
-    public function places(): Collection
87
-    {
88
-        return $this->places;
89
-    }
81
+	/**
82
+	 * Returns the list of place for the lineage
83
+	 *
84
+	 * @return Collection<string, int>
85
+	 */
86
+	public function places(): Collection
87
+	{
88
+		return $this->places;
89
+	}
90 90
 }
Please login to merge, or discard this patch.
app/Module/AdminTasks/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 MigrationInterface::upgrade()
27
-     */
28
-    public function upgrade(): void
29
-    {
30
-        // These migrations have been merged into migration 1.
31
-    }
24
+	/**
25
+	 * {@inheritDoc}
26
+	 * @see MigrationInterface::upgrade()
27
+	 */
28
+	public function upgrade(): void
29
+	{
30
+		// These migrations have been merged into migration 1.
31
+	}
32 32
 }
Please login to merge, or discard this patch.
app/Module/AdminTasks/Http/RequestHandlers/TaskEditPage.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -31,58 +31,58 @@
 block discarded – undo
31 31
  */
32 32
 class TaskEditPage implements RequestHandlerInterface
33 33
 {
34
-    use ViewResponseTrait;
34
+	use ViewResponseTrait;
35 35
 
36
-    private ?AdminTasksModule $module;
37
-    private TaskScheduleService $taskschedules_service;
36
+	private ?AdminTasksModule $module;
37
+	private TaskScheduleService $taskschedules_service;
38 38
 
39
-    /**
40
-     * Constructor for TaskEditPage Request Handler
41
-     *
42
-     * @param ModuleService $module_service
43
-     * @param TaskScheduleService $taskschedules_service
44
-     */
45
-    public function __construct(ModuleService $module_service, TaskScheduleService $taskschedules_service)
46
-    {
47
-        $this->module = $module_service->findByInterface(AdminTasksModule::class)->first();
48
-        $this->taskschedules_service = $taskschedules_service;
49
-    }
39
+	/**
40
+	 * Constructor for TaskEditPage Request Handler
41
+	 *
42
+	 * @param ModuleService $module_service
43
+	 * @param TaskScheduleService $taskschedules_service
44
+	 */
45
+	public function __construct(ModuleService $module_service, TaskScheduleService $taskschedules_service)
46
+	{
47
+		$this->module = $module_service->findByInterface(AdminTasksModule::class)->first();
48
+		$this->taskschedules_service = $taskschedules_service;
49
+	}
50 50
 
51
-    /**
52
-     * {@inheritDoc}
53
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
54
-     */
55
-    public function handle(ServerRequestInterface $request): ResponseInterface
56
-    {
57
-        $this->layout = 'layouts/administration';
51
+	/**
52
+	 * {@inheritDoc}
53
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
54
+	 */
55
+	public function handle(ServerRequestInterface $request): ResponseInterface
56
+	{
57
+		$this->layout = 'layouts/administration';
58 58
 
59
-        if ($this->module === null) {
60
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
61
-        }
59
+		if ($this->module === null) {
60
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
61
+		}
62 62
 
63
-        $task_sched_id = Validator::attributes($request)->integer('task', -1);
64
-        $task_schedule = $this->taskschedules_service->find($task_sched_id);
63
+		$task_sched_id = Validator::attributes($request)->integer('task', -1);
64
+		$task_schedule = $this->taskschedules_service->find($task_sched_id);
65 65
 
66
-        if ($task_schedule === null) {
67
-            throw new HttpNotFoundException(I18N::translate('The Task schedule could not be found.'));
68
-        }
66
+		if ($task_schedule === null) {
67
+			throw new HttpNotFoundException(I18N::translate('The Task schedule could not be found.'));
68
+		}
69 69
 
70
-        $task = $this->taskschedules_service->findTask($task_schedule->taskId());
70
+		$task = $this->taskschedules_service->findTask($task_schedule->taskId());
71 71
 
72
-        if ($task === null) {
73
-            throw new HttpNotFoundException(I18N::translate('The Task schedule could not be found.'));
74
-        }
72
+		if ($task === null) {
73
+			throw new HttpNotFoundException(I18N::translate('The Task schedule could not be found.'));
74
+		}
75 75
 
76
-        $has_task_config = $task instanceof ConfigurableTaskInterface;
77
-        /** @var \MyArtJaub\Webtrees\Contracts\Tasks\TaskInterface&\MyArtJaub\Webtrees\Contracts\Tasks\ConfigurableTaskInterface $task */
76
+		$has_task_config = $task instanceof ConfigurableTaskInterface;
77
+		/** @var \MyArtJaub\Webtrees\Contracts\Tasks\TaskInterface&\MyArtJaub\Webtrees\Contracts\Tasks\ConfigurableTaskInterface $task */
78 78
 
79
-        return $this->viewResponse($this->module->name() . '::admin/tasks-edit', [
80
-            'module'            =>  $this->module,
81
-            'title'             =>  I18N::translate('Edit the administrative task') . ' - ' . $task->name(),
82
-            'task_schedule'     =>  $task_schedule,
83
-            'task'              =>  $task,
84
-            'has_task_config'   =>  $has_task_config,
85
-            'task_config_view'  =>  $has_task_config ? $task->configView($request) : ''
86
-        ]);
87
-    }
79
+		return $this->viewResponse($this->module->name() . '::admin/tasks-edit', [
80
+			'module'            =>  $this->module,
81
+			'title'             =>  I18N::translate('Edit the administrative task') . ' - ' . $task->name(),
82
+			'task_schedule'     =>  $task_schedule,
83
+			'task'              =>  $task,
84
+			'has_task_config'   =>  $has_task_config,
85
+			'task_config_view'  =>  $has_task_config ? $task->configView($request) : ''
86
+		]);
87
+	}
88 88
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@
 block discarded – undo
76 76
         $has_task_config = $task instanceof ConfigurableTaskInterface;
77 77
         /** @var \MyArtJaub\Webtrees\Contracts\Tasks\TaskInterface&\MyArtJaub\Webtrees\Contracts\Tasks\ConfigurableTaskInterface $task */
78 78
 
79
-        return $this->viewResponse($this->module->name() . '::admin/tasks-edit', [
79
+        return $this->viewResponse($this->module->name().'::admin/tasks-edit', [
80 80
             'module'            =>  $this->module,
81
-            'title'             =>  I18N::translate('Edit the administrative task') . ' - ' . $task->name(),
81
+            'title'             =>  I18N::translate('Edit the administrative task').' - '.$task->name(),
82 82
             'task_schedule'     =>  $task_schedule,
83 83
             'task'              =>  $task,
84 84
             'has_task_config'   =>  $has_task_config,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Views/GeoAnalysisMap.php 2 patches
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -32,117 +32,117 @@
 block discarded – undo
32 32
  */
33 33
 class GeoAnalysisMap extends AbstractGeoAnalysisView
34 34
 {
35
-    private ?MapColorsConfig $colors_config = null;
36
-
37
-    public function type(): string
38
-    {
39
-        return I18N::translateContext('GEODISPERSION', 'Map');
40
-    }
41
-
42
-    /**
43
-     * {@inheritDoc}
44
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon()
45
-     */
46
-    public function icon(ModuleInterface $module): string
47
-    {
48
-        return view($module->name() . '::icons/view-map', ['type' => $this->type()]);
49
-    }
50
-
51
-    /**
52
-     * {@inheritDoc}
53
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent()
54
-     */
55
-    public function globalSettingsContent(ModuleInterface $module): string
56
-    {
57
-        return view($module->name() . '::admin/view-edit-map', [
58
-            'module_name'   =>  $module->name(),
59
-            'view'          =>  $this,
60
-            'colors'        =>  $this->colors(),
61
-            'map_adapters'  =>  app(MapAdapterDataService::class)->allForView($this, true)
62
-        ]);
63
-    }
64
-
65
-    /**
66
-     * {@inheritDoc}
67
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate()
68
-     * @return static
69
-     */
70
-    public function withGlobalSettingsUpdate(ServerRequestInterface $request): self
71
-    {
72
-        $default_color  = Validator::parsedBody($request)->string('view_map_color_default', '');
73
-        $stroke_color   = Validator::parsedBody($request)->string('view_map_color_stroke', '');
74
-        $maxvalue_color  = Validator::parsedBody($request)->string('view_map_color_maxvalue', '');
75
-        $hover_color  = Validator::parsedBody($request)->string('view_map_color_hover', '');
76
-
77
-        try {
78
-            return $this->withColors(new MapColorsConfig(
79
-                Hex::fromString($default_color),
80
-                Hex::fromString($stroke_color),
81
-                Hex::fromString($maxvalue_color),
82
-                Hex::fromString($hover_color)
83
-            ));
84
-        } catch (InvalidColorValue $ex) {
85
-        }
86
-
87
-        return $this;
88
-    }
89
-
90
-    /**
91
-     * {@inheritDoc}
92
-     * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent()
93
-     */
94
-    public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string
95
-    {
96
-        $map_adapters = app(MapAdapterDataService::class)->allForView($this);
97
-
98
-        $adapter_result = null;
99
-        foreach ($map_adapters as $map_adapter) {
100
-            $adapter_result_tmp = $map_adapter->convert($result);
101
-            $adapter_result = $adapter_result === null ?
102
-                $adapter_result_tmp :
103
-                $adapter_result->merge($adapter_result_tmp);
104
-        }
105
-
106
-        if ($adapter_result === null) {
107
-            return view($module->name() . '::errors/tab-error', [
108
-                'message'   =>  I18N::translate('The map could not be loaded.'),
109
-            ]);
110
-        }
111
-
112
-        return view($module->name() . '::geoanalysisview-tab-glb-map', $params + [
113
-            'result'            =>  $adapter_result->geoAnalysisResult(),
114
-            'features'          =>  $adapter_result->features(),
115
-            'colors'            =>  $this->colors(),
116
-            'leaflet_config'    =>  app(LeafletJsService::class)->config(),
117
-            'js_script_url'     =>  $module->assetUrl('js/geodispersion.min.js')
118
-        ]);
119
-    }
120
-
121
-    /**
122
-     * Get the color scheme configuration for the map view
123
-     *
124
-     * @return MapColorsConfig
125
-     */
126
-    public function colors(): MapColorsConfig
127
-    {
128
-        return $this->colors_config ?? new MapColorsConfig(
129
-            new Rgb(245, 245, 245),
130
-            new Rgb(213, 213, 213),
131
-            new Rgb(4, 147, 171),
132
-            new Rgb(255, 102, 0)
133
-        );
134
-    }
135
-
136
-    /**
137
-     * Returns a map view with a new color scheme configuration
138
-     *
139
-     * @param MapColorsConfig $config
140
-     * @return static
141
-     */
142
-    public function withColors(?MapColorsConfig $config): self
143
-    {
144
-        $new = clone $this;
145
-        $new->colors_config = $config;
146
-        return $new;
147
-    }
35
+	private ?MapColorsConfig $colors_config = null;
36
+
37
+	public function type(): string
38
+	{
39
+		return I18N::translateContext('GEODISPERSION', 'Map');
40
+	}
41
+
42
+	/**
43
+	 * {@inheritDoc}
44
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::icon()
45
+	 */
46
+	public function icon(ModuleInterface $module): string
47
+	{
48
+		return view($module->name() . '::icons/view-map', ['type' => $this->type()]);
49
+	}
50
+
51
+	/**
52
+	 * {@inheritDoc}
53
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalSettingsContent()
54
+	 */
55
+	public function globalSettingsContent(ModuleInterface $module): string
56
+	{
57
+		return view($module->name() . '::admin/view-edit-map', [
58
+			'module_name'   =>  $module->name(),
59
+			'view'          =>  $this,
60
+			'colors'        =>  $this->colors(),
61
+			'map_adapters'  =>  app(MapAdapterDataService::class)->allForView($this, true)
62
+		]);
63
+	}
64
+
65
+	/**
66
+	 * {@inheritDoc}
67
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::withGlobalSettingsUpdate()
68
+	 * @return static
69
+	 */
70
+	public function withGlobalSettingsUpdate(ServerRequestInterface $request): self
71
+	{
72
+		$default_color  = Validator::parsedBody($request)->string('view_map_color_default', '');
73
+		$stroke_color   = Validator::parsedBody($request)->string('view_map_color_stroke', '');
74
+		$maxvalue_color  = Validator::parsedBody($request)->string('view_map_color_maxvalue', '');
75
+		$hover_color  = Validator::parsedBody($request)->string('view_map_color_hover', '');
76
+
77
+		try {
78
+			return $this->withColors(new MapColorsConfig(
79
+				Hex::fromString($default_color),
80
+				Hex::fromString($stroke_color),
81
+				Hex::fromString($maxvalue_color),
82
+				Hex::fromString($hover_color)
83
+			));
84
+		} catch (InvalidColorValue $ex) {
85
+		}
86
+
87
+		return $this;
88
+	}
89
+
90
+	/**
91
+	 * {@inheritDoc}
92
+	 * @see \MyArtJaub\Webtrees\Module\GeoDispersion\Views\AbstractGeoAnalysisView::globalTabContent()
93
+	 */
94
+	public function globalTabContent(GeoDispersionModule $module, GeoAnalysisResult $result, array $params): string
95
+	{
96
+		$map_adapters = app(MapAdapterDataService::class)->allForView($this);
97
+
98
+		$adapter_result = null;
99
+		foreach ($map_adapters as $map_adapter) {
100
+			$adapter_result_tmp = $map_adapter->convert($result);
101
+			$adapter_result = $adapter_result === null ?
102
+				$adapter_result_tmp :
103
+				$adapter_result->merge($adapter_result_tmp);
104
+		}
105
+
106
+		if ($adapter_result === null) {
107
+			return view($module->name() . '::errors/tab-error', [
108
+				'message'   =>  I18N::translate('The map could not be loaded.'),
109
+			]);
110
+		}
111
+
112
+		return view($module->name() . '::geoanalysisview-tab-glb-map', $params + [
113
+			'result'            =>  $adapter_result->geoAnalysisResult(),
114
+			'features'          =>  $adapter_result->features(),
115
+			'colors'            =>  $this->colors(),
116
+			'leaflet_config'    =>  app(LeafletJsService::class)->config(),
117
+			'js_script_url'     =>  $module->assetUrl('js/geodispersion.min.js')
118
+		]);
119
+	}
120
+
121
+	/**
122
+	 * Get the color scheme configuration for the map view
123
+	 *
124
+	 * @return MapColorsConfig
125
+	 */
126
+	public function colors(): MapColorsConfig
127
+	{
128
+		return $this->colors_config ?? new MapColorsConfig(
129
+			new Rgb(245, 245, 245),
130
+			new Rgb(213, 213, 213),
131
+			new Rgb(4, 147, 171),
132
+			new Rgb(255, 102, 0)
133
+		);
134
+	}
135
+
136
+	/**
137
+	 * Returns a map view with a new color scheme configuration
138
+	 *
139
+	 * @param MapColorsConfig $config
140
+	 * @return static
141
+	 */
142
+	public function withColors(?MapColorsConfig $config): self
143
+	{
144
+		$new = clone $this;
145
+		$new->colors_config = $config;
146
+		return $new;
147
+	}
148 148
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function icon(ModuleInterface $module): string
47 47
     {
48
-        return view($module->name() . '::icons/view-map', ['type' => $this->type()]);
48
+        return view($module->name().'::icons/view-map', ['type' => $this->type()]);
49 49
     }
50 50
 
51 51
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function globalSettingsContent(ModuleInterface $module): string
56 56
     {
57
-        return view($module->name() . '::admin/view-edit-map', [
57
+        return view($module->name().'::admin/view-edit-map', [
58 58
             'module_name'   =>  $module->name(),
59 59
             'view'          =>  $this,
60 60
             'colors'        =>  $this->colors(),
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $default_color  = Validator::parsedBody($request)->string('view_map_color_default', '');
73 73
         $stroke_color   = Validator::parsedBody($request)->string('view_map_color_stroke', '');
74
-        $maxvalue_color  = Validator::parsedBody($request)->string('view_map_color_maxvalue', '');
75
-        $hover_color  = Validator::parsedBody($request)->string('view_map_color_hover', '');
74
+        $maxvalue_color = Validator::parsedBody($request)->string('view_map_color_maxvalue', '');
75
+        $hover_color = Validator::parsedBody($request)->string('view_map_color_hover', '');
76 76
 
77 77
         try {
78 78
             return $this->withColors(new MapColorsConfig(
@@ -99,17 +99,16 @@  discard block
 block discarded – undo
99 99
         foreach ($map_adapters as $map_adapter) {
100 100
             $adapter_result_tmp = $map_adapter->convert($result);
101 101
             $adapter_result = $adapter_result === null ?
102
-                $adapter_result_tmp :
103
-                $adapter_result->merge($adapter_result_tmp);
102
+                $adapter_result_tmp : $adapter_result->merge($adapter_result_tmp);
104 103
         }
105 104
 
106 105
         if ($adapter_result === null) {
107
-            return view($module->name() . '::errors/tab-error', [
106
+            return view($module->name().'::errors/tab-error', [
108 107
                 'message'   =>  I18N::translate('The map could not be loaded.'),
109 108
             ]);
110 109
         }
111 110
 
112
-        return view($module->name() . '::geoanalysisview-tab-glb-map', $params + [
111
+        return view($module->name().'::geoanalysisview-tab-glb-map', $params + [
113 112
             'result'            =>  $adapter_result->geoAnalysisResult(),
114 113
             'features'          =>  $adapter_result->features(),
115 114
             'colors'            =>  $this->colors(),
Please login to merge, or discard this patch.
app/Module/GeoDispersion/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
-        // This migration has been superseded by migration 1.
31
-    }
24
+	/**
25
+	 * {@inheritDoc}
26
+	 * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
+	 */
28
+	public function upgrade(): void
29
+	{
30
+		// This migration has been superseded by migration 1.
31
+	}
32 32
 }
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Schema/Migration1.php 2 patches
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 Migration1 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
-        DB::schema()->create('maj_geodisp_views', static function (Blueprint $table): void {
35
-            $table->integer('majgv_id')->autoIncrement();
36
-            $table->integer('majgv_gedcom_id')->index();
37
-            $table->string('majgv_view_class', 255);
38
-            $table->enum('majgv_status', ['enabled', 'disabled'])->default('enabled');
39
-            $table->string('majgv_descr', 248);
40
-            $table->string('majgv_analysis', 255);
41
-            $table->tinyInteger('majgv_place_depth')->default(1);
42
-            $table->tinyInteger('majgv_top_places')->default(0);
43
-            $table->json('majgv_colors')->nullable();
44
-
45
-            $table->foreign('majgv_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
46
-        });
47
-
48
-        DB::schema()->create('maj_geodisp_mapviews', static function (Blueprint $table): void {
49
-            $table->integer('majgm_id')->autoIncrement();
50
-            $table->integer('majgm_majgv_id')->index();
51
-            $table->string('majgm_map_id', 127);
52
-            $table->string('majgm_mapper', 255);
53
-            $table->string('majgm_feature_prop', 31);
54
-            $table->json('majgm_config')->nullable();
55
-
56
-            $table->foreign('majgm_majgv_id')->references('majgv_id')->on('maj_geodisp_views')->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
+		DB::schema()->create('maj_geodisp_views', static function (Blueprint $table): void {
35
+			$table->integer('majgv_id')->autoIncrement();
36
+			$table->integer('majgv_gedcom_id')->index();
37
+			$table->string('majgv_view_class', 255);
38
+			$table->enum('majgv_status', ['enabled', 'disabled'])->default('enabled');
39
+			$table->string('majgv_descr', 248);
40
+			$table->string('majgv_analysis', 255);
41
+			$table->tinyInteger('majgv_place_depth')->default(1);
42
+			$table->tinyInteger('majgv_top_places')->default(0);
43
+			$table->json('majgv_colors')->nullable();
44
+
45
+			$table->foreign('majgv_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
46
+		});
47
+
48
+		DB::schema()->create('maj_geodisp_mapviews', static function (Blueprint $table): void {
49
+			$table->integer('majgm_id')->autoIncrement();
50
+			$table->integer('majgm_majgv_id')->index();
51
+			$table->string('majgm_map_id', 127);
52
+			$table->string('majgm_mapper', 255);
53
+			$table->string('majgm_feature_prop', 31);
54
+			$table->json('majgm_config')->nullable();
55
+
56
+			$table->foreign('majgm_majgv_id')->references('majgv_id')->on('maj_geodisp_views')->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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $in_transaction = DB::connection()->getPdo()->inTransaction();
33 33
 
34
-        DB::schema()->create('maj_geodisp_views', static function (Blueprint $table): void {
34
+        DB::schema()->create('maj_geodisp_views', static function(Blueprint $table): void {
35 35
             $table->integer('majgv_id')->autoIncrement();
36 36
             $table->integer('majgv_gedcom_id')->index();
37 37
             $table->string('majgv_view_class', 255);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $table->foreign('majgv_gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
46 46
         });
47 47
 
48
-        DB::schema()->create('maj_geodisp_mapviews', static function (Blueprint $table): void {
48
+        DB::schema()->create('maj_geodisp_mapviews', static function(Blueprint $table): void {
49 49
             $table->integer('majgm_id')->autoIncrement();
50 50
             $table->integer('majgm_majgv_id')->index();
51 51
             $table->string('majgm_map_id', 127);
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/GeoAnalysisViewAddPage.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -32,48 +32,48 @@
 block discarded – undo
32 32
  */
33 33
 class GeoAnalysisViewAddPage implements RequestHandlerInterface
34 34
 {
35
-    use ViewResponseTrait;
35
+	use ViewResponseTrait;
36 36
 
37
-    private ?GeoDispersionModule $module;
38
-    private GeoAnalysisService $geoanalysis_service;
39
-    private GeoAnalysisDataService $geoanalysis_data_service;
37
+	private ?GeoDispersionModule $module;
38
+	private GeoAnalysisService $geoanalysis_service;
39
+	private GeoAnalysisDataService $geoanalysis_data_service;
40 40
 
41
-    /**
42
-     * Constructor for GeoAnalysisViewAddPage Request Handler
43
-     *
44
-     * @param ModuleService $module_service
45
-     * @param GeoAnalysisService $geoanalysis_service
46
-     * @param GeoAnalysisDataService $geoanalysis_data_service
47
-     */
48
-    public function __construct(
49
-        ModuleService $module_service,
50
-        GeoAnalysisService $geoanalysis_service,
51
-        GeoAnalysisDataService $geoanalysis_data_service
52
-    ) {
53
-        $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
54
-        $this->geoanalysis_service = $geoanalysis_service;
55
-        $this->geoanalysis_data_service = $geoanalysis_data_service;
56
-    }
41
+	/**
42
+	 * Constructor for GeoAnalysisViewAddPage Request Handler
43
+	 *
44
+	 * @param ModuleService $module_service
45
+	 * @param GeoAnalysisService $geoanalysis_service
46
+	 * @param GeoAnalysisDataService $geoanalysis_data_service
47
+	 */
48
+	public function __construct(
49
+		ModuleService $module_service,
50
+		GeoAnalysisService $geoanalysis_service,
51
+		GeoAnalysisDataService $geoanalysis_data_service
52
+	) {
53
+		$this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
54
+		$this->geoanalysis_service = $geoanalysis_service;
55
+		$this->geoanalysis_data_service = $geoanalysis_data_service;
56
+	}
57 57
 
58
-    /**
59
-     * {@inheritDoc}
60
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
61
-     */
62
-    public function handle(ServerRequestInterface $request): ResponseInterface
63
-    {
64
-        $this->layout = 'layouts/administration';
58
+	/**
59
+	 * {@inheritDoc}
60
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
61
+	 */
62
+	public function handle(ServerRequestInterface $request): ResponseInterface
63
+	{
64
+		$this->layout = 'layouts/administration';
65 65
 
66
-        if ($this->module === null) {
67
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
68
-        }
69
-        $tree = Validator::attributes($request)->tree();
66
+		if ($this->module === null) {
67
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
68
+		}
69
+		$tree = Validator::attributes($request)->tree();
70 70
 
71
-        return $this->viewResponse($this->module->name() . '::admin/view-add', [
72
-            'module'        =>  $this->module,
73
-            'title'         =>  I18N::translate('Add a geographical dispersion analysis view'),
74
-            'tree'          =>  $tree,
75
-            'geoanalysis_list'  =>  $this->geoanalysis_service->all(),
76
-            'place_example'     =>  $this->geoanalysis_data_service->placeHierarchyExample($tree)
77
-        ]);
78
-    }
71
+		return $this->viewResponse($this->module->name() . '::admin/view-add', [
72
+			'module'        =>  $this->module,
73
+			'title'         =>  I18N::translate('Add a geographical dispersion analysis view'),
74
+			'tree'          =>  $tree,
75
+			'geoanalysis_list'  =>  $this->geoanalysis_service->all(),
76
+			'place_example'     =>  $this->geoanalysis_data_service->placeHierarchyExample($tree)
77
+		]);
78
+	}
79 79
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
         $tree = Validator::attributes($request)->tree();
70 70
 
71
-        return $this->viewResponse($this->module->name() . '::admin/view-add', [
71
+        return $this->viewResponse($this->module->name().'::admin/view-add', [
72 72
             'module'        =>  $this->module,
73 73
             'title'         =>  I18N::translate('Add a geographical dispersion analysis view'),
74 74
             'tree'          =>  $tree,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterEditPage.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -33,68 +33,68 @@
 block discarded – undo
33 33
  */
34 34
 class MapAdapterEditPage implements RequestHandlerInterface
35 35
 {
36
-    use ViewResponseTrait;
36
+	use ViewResponseTrait;
37 37
 
38
-    private ?GeoDispersionModule $module;
39
-    private MapAdapterDataService $mapadapter_data_service;
40
-    private MapDefinitionsService $map_definition_service;
41
-    private PlaceMapperService $place_mapper_service;
38
+	private ?GeoDispersionModule $module;
39
+	private MapAdapterDataService $mapadapter_data_service;
40
+	private MapDefinitionsService $map_definition_service;
41
+	private PlaceMapperService $place_mapper_service;
42 42
 
43
-    /**
44
-     * Constructor for MapAdapterEditPage Request Handler
45
-     *
46
-     * @param ModuleService $module_service
47
-     * @param MapAdapterDataService $mapadapter_data_service
48
-     * @param MapDefinitionsService $map_definition_service
49
-     * @param PlaceMapperService $place_mapper_service
50
-     */
51
-    public function __construct(
52
-        ModuleService $module_service,
53
-        MapAdapterDataService $mapadapter_data_service,
54
-        MapDefinitionsService $map_definition_service,
55
-        PlaceMapperService $place_mapper_service
56
-    ) {
57
-        $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
58
-        $this->mapadapter_data_service = $mapadapter_data_service;
59
-        $this->map_definition_service = $map_definition_service;
60
-        $this->place_mapper_service = $place_mapper_service;
61
-    }
43
+	/**
44
+	 * Constructor for MapAdapterEditPage Request Handler
45
+	 *
46
+	 * @param ModuleService $module_service
47
+	 * @param MapAdapterDataService $mapadapter_data_service
48
+	 * @param MapDefinitionsService $map_definition_service
49
+	 * @param PlaceMapperService $place_mapper_service
50
+	 */
51
+	public function __construct(
52
+		ModuleService $module_service,
53
+		MapAdapterDataService $mapadapter_data_service,
54
+		MapDefinitionsService $map_definition_service,
55
+		PlaceMapperService $place_mapper_service
56
+	) {
57
+		$this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
58
+		$this->mapadapter_data_service = $mapadapter_data_service;
59
+		$this->map_definition_service = $map_definition_service;
60
+		$this->place_mapper_service = $place_mapper_service;
61
+	}
62 62
 
63
-    /**
64
-     * {@inheritDoc}
65
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
66
-     */
67
-    public function handle(ServerRequestInterface $request): ResponseInterface
68
-    {
69
-        $this->layout = 'layouts/administration';
63
+	/**
64
+	 * {@inheritDoc}
65
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
66
+	 */
67
+	public function handle(ServerRequestInterface $request): ResponseInterface
68
+	{
69
+		$this->layout = 'layouts/administration';
70 70
 
71
-        if ($this->module === null) {
72
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
73
-        }
71
+		if ($this->module === null) {
72
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
73
+		}
74 74
 
75
-        $tree = Validator::attributes($request)->tree();
75
+		$tree = Validator::attributes($request)->tree();
76 76
 
77
-        $adapter_id = Validator::attributes($request)->integer('adapter_id', -1);
78
-        $map_adapter = $this->mapadapter_data_service->find($adapter_id);
77
+		$adapter_id = Validator::attributes($request)->integer('adapter_id', -1);
78
+		$map_adapter = $this->mapadapter_data_service->find($adapter_id);
79 79
 
80
-        if ($map_adapter === null) {
81
-            throw new HttpNotFoundException(
82
-                I18N::translate('The map configuration could not be found.')
83
-            );
84
-        }
80
+		if ($map_adapter === null) {
81
+			throw new HttpNotFoundException(
82
+				I18N::translate('The map configuration could not be found.')
83
+			);
84
+		}
85 85
 
86
-        return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [
87
-            'module'            =>  $this->module,
88
-            'title'             =>  I18N::translate('Edit the map configuration'),
89
-            'tree'              =>  $tree,
90
-            'view_id'           =>  $map_adapter->geoAnalysisViewId(),
91
-            'map_adapter'       =>  $map_adapter,
92
-            'maps_list'         =>  $this->map_definition_service->all(),
93
-            'mappers_list'      =>  $this->place_mapper_service->all(),
94
-            'route_edit'        =>  route(MapAdapterEditAction::class, [
95
-                                        'tree' => $tree->name(),
96
-                                        'adapter_id' => $map_adapter->id()
97
-                                    ])
98
-        ]);
99
-    }
86
+		return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [
87
+			'module'            =>  $this->module,
88
+			'title'             =>  I18N::translate('Edit the map configuration'),
89
+			'tree'              =>  $tree,
90
+			'view_id'           =>  $map_adapter->geoAnalysisViewId(),
91
+			'map_adapter'       =>  $map_adapter,
92
+			'maps_list'         =>  $this->map_definition_service->all(),
93
+			'mappers_list'      =>  $this->place_mapper_service->all(),
94
+			'route_edit'        =>  route(MapAdapterEditAction::class, [
95
+										'tree' => $tree->name(),
96
+										'adapter_id' => $map_adapter->id()
97
+									])
98
+		]);
99
+	}
100 100
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             );
84 84
         }
85 85
 
86
-        return $this->viewResponse($this->module->name() . '::admin/map-adapter-edit', [
86
+        return $this->viewResponse($this->module->name().'::admin/map-adapter-edit', [
87 87
             'module'            =>  $this->module,
88 88
             'title'             =>  I18N::translate('Edit the map configuration'),
89 89
             'tree'              =>  $tree,
Please login to merge, or discard this patch.
app/Module/GeoDispersion/Http/RequestHandlers/MapAdapterMapperConfig.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -33,67 +33,67 @@
 block discarded – undo
33 33
  */
34 34
 class MapAdapterMapperConfig implements RequestHandlerInterface
35 35
 {
36
-    use ViewResponseTrait;
36
+	use ViewResponseTrait;
37 37
 
38
-    private ?GeoDispersionModule $module;
39
-    private MapAdapterDataService $mapadapter_data_service;
38
+	private ?GeoDispersionModule $module;
39
+	private MapAdapterDataService $mapadapter_data_service;
40 40
 
41
-    /**
42
-     * Constructor for MapAdapterMapperConfig Request Handler
43
-     *
44
-     * @param ModuleService $module_service
45
-     * @param MapAdapterDataService $mapadapter_data_service
46
-     */
47
-    public function __construct(
48
-        ModuleService $module_service,
49
-        MapAdapterDataService $mapadapter_data_service
50
-    ) {
51
-        $this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
52
-        $this->mapadapter_data_service = $mapadapter_data_service;
53
-    }
41
+	/**
42
+	 * Constructor for MapAdapterMapperConfig Request Handler
43
+	 *
44
+	 * @param ModuleService $module_service
45
+	 * @param MapAdapterDataService $mapadapter_data_service
46
+	 */
47
+	public function __construct(
48
+		ModuleService $module_service,
49
+		MapAdapterDataService $mapadapter_data_service
50
+	) {
51
+		$this->module = $module_service->findByInterface(GeoDispersionModule::class)->first();
52
+		$this->mapadapter_data_service = $mapadapter_data_service;
53
+	}
54 54
 
55
-    /**
56
-     * {@inheritDoc}
57
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
58
-     */
59
-    public function handle(ServerRequestInterface $request): ResponseInterface
60
-    {
61
-        $this->layout = 'layouts/ajax';
55
+	/**
56
+	 * {@inheritDoc}
57
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
58
+	 */
59
+	public function handle(ServerRequestInterface $request): ResponseInterface
60
+	{
61
+		$this->layout = 'layouts/ajax';
62 62
 
63
-        if ($this->module === null) {
64
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
65
-        }
66
-        $tree = Validator::attributes($request)->tree();
63
+		if ($this->module === null) {
64
+			throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
65
+		}
66
+		$tree = Validator::attributes($request)->tree();
67 67
 
68
-        $adapter_id = Validator::attributes($request)->integer('adapter_id', -1);
69
-        $map_adapter = $this->mapadapter_data_service->find($adapter_id);
68
+		$adapter_id = Validator::attributes($request)->integer('adapter_id', -1);
69
+		$map_adapter = $this->mapadapter_data_service->find($adapter_id);
70 70
 
71
-        $mapper_class = Validator::queryParams($request)->string('mapper', '');
72
-        $mapper = null;
73
-        if ($mapper_class === '' && $map_adapter !== null) {
74
-            $mapper = $map_adapter->placeMapper();
75
-        } else {
76
-            try {
77
-                $mapper = app($mapper_class);
78
-            } catch (BindingResolutionException $ex) {
79
-            }
71
+		$mapper_class = Validator::queryParams($request)->string('mapper', '');
72
+		$mapper = null;
73
+		if ($mapper_class === '' && $map_adapter !== null) {
74
+			$mapper = $map_adapter->placeMapper();
75
+		} else {
76
+			try {
77
+				$mapper = app($mapper_class);
78
+			} catch (BindingResolutionException $ex) {
79
+			}
80 80
 
81
-            if (
82
-                $mapper !== null && $map_adapter !== null &&
83
-                get_class($map_adapter->placeMapper()) === get_class($mapper)
84
-            ) {
85
-                $mapper = $map_adapter->placeMapper();
86
-            }
87
-        }
81
+			if (
82
+				$mapper !== null && $map_adapter !== null &&
83
+				get_class($map_adapter->placeMapper()) === get_class($mapper)
84
+			) {
85
+				$mapper = $map_adapter->placeMapper();
86
+			}
87
+		}
88 88
 
89
-        if ($mapper === null || !($mapper instanceof PlaceMapperInterface)) {
90
-            throw new HttpNotFoundException(
91
-                I18N::translate('The configuration for the place mapper could not be found.')
92
-            );
93
-        }
89
+		if ($mapper === null || !($mapper instanceof PlaceMapperInterface)) {
90
+			throw new HttpNotFoundException(
91
+				I18N::translate('The configuration for the place mapper could not be found.')
92
+			);
93
+		}
94 94
 
95
-        return $this->viewResponse('layouts/ajax', [
96
-            'content' => $mapper->config()->configContent($this->module, $tree)
97
-        ]);
98
-    }
95
+		return $this->viewResponse('layouts/ajax', [
96
+			'content' => $mapper->config()->configContent($this->module, $tree)
97
+		]);
98
+	}
99 99
 }
Please login to merge, or discard this patch.