Passed
Push — feature/code-analysis ( 00c5b4...e321b8 )
by Jonathan
13:27
created
app/Module/IsSourced/IsSourcedModule.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -33,105 +33,105 @@
 block discarded – undo
33 33
  * IsSourced Module
34 34
  */
35 35
 class IsSourcedModule extends AbstractModule implements
36
-    ModuleMyArtJaubInterface,
37
-    ModuleGlobalInterface,
38
-    ModuleSidebarInterface,
39
-    ModuleHookSubscriberInterface
36
+	ModuleMyArtJaubInterface,
37
+	ModuleGlobalInterface,
38
+	ModuleSidebarInterface,
39
+	ModuleHookSubscriberInterface
40 40
 {
41
-    use ModuleMyArtJaubTrait;
42
-    use ModuleGlobalTrait;
43
-    use ModuleSidebarTrait;
41
+	use ModuleMyArtJaubTrait;
42
+	use ModuleGlobalTrait;
43
+	use ModuleSidebarTrait;
44 44
 
45
-    /**
46
-     * {@inheritDoc}
47
-     * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
48
-     */
49
-    public function title(): string
50
-    {
51
-        return I18N::translate('Sourced events');
52
-    }
45
+	/**
46
+	 * {@inheritDoc}
47
+	 * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
48
+	 */
49
+	public function title(): string
50
+	{
51
+		return I18N::translate('Sourced events');
52
+	}
53 53
 
54
-    /**
55
-     * {@inheritDoc}
56
-     * @see \Fisharebest\Webtrees\Module\AbstractModule::description()
57
-     */
58
-    public function description(): string
59
-    {
60
-        return I18N::translate('Indicate if events related to an record are sourced.');
61
-    }
54
+	/**
55
+	 * {@inheritDoc}
56
+	 * @see \Fisharebest\Webtrees\Module\AbstractModule::description()
57
+	 */
58
+	public function description(): string
59
+	{
60
+		return I18N::translate('Indicate if events related to an record are sourced.');
61
+	}
62 62
 
63
-    /**
64
-     * {@inheritDoc}
65
-     * @see \Fisharebest\Webtrees\Module\ModuleCustomInterface::customModuleVersion()
66
-     */
67
-    public function customModuleVersion(): string
68
-    {
69
-        return '2.1.8-v.1';
70
-    }
63
+	/**
64
+	 * {@inheritDoc}
65
+	 * @see \Fisharebest\Webtrees\Module\ModuleCustomInterface::customModuleVersion()
66
+	 */
67
+	public function customModuleVersion(): string
68
+	{
69
+		return '2.1.8-v.1';
70
+	}
71 71
 
72
-    /**
73
-     * {@inheritDoc}
74
-     * @see \Fisharebest\Webtrees\Module\ModuleGlobalInterface::headContent()
75
-     */
76
-    public function headContent(): string
77
-    {
78
-        return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
79
-    }
72
+	/**
73
+	 * {@inheritDoc}
74
+	 * @see \Fisharebest\Webtrees\Module\ModuleGlobalInterface::headContent()
75
+	 */
76
+	public function headContent(): string
77
+	{
78
+		return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">';
79
+	}
80 80
 
81
-    /**
82
-     * {@inheritDoc}
83
-     * @see \Fisharebest\Webtrees\Module\ModuleGlobalInterface::bodyContent()
84
-     */
85
-    public function bodyContent(): string
86
-    {
87
-        return '<script src="' . $this->assetUrl('js/issourced.min.js') . '"></script>';
88
-    }
81
+	/**
82
+	 * {@inheritDoc}
83
+	 * @see \Fisharebest\Webtrees\Module\ModuleGlobalInterface::bodyContent()
84
+	 */
85
+	public function bodyContent(): string
86
+	{
87
+		return '<script src="' . $this->assetUrl('js/issourced.min.js') . '"></script>';
88
+	}
89 89
 
90
-    /**
91
-     * {@inheritDoc}
92
-     * @see \Fisharebest\Webtrees\Module\ModuleSidebarInterface::hasSidebarContent()
93
-     */
94
-    public function hasSidebarContent(Individual $individual): bool
95
-    {
96
-        return true;
97
-    }
90
+	/**
91
+	 * {@inheritDoc}
92
+	 * @see \Fisharebest\Webtrees\Module\ModuleSidebarInterface::hasSidebarContent()
93
+	 */
94
+	public function hasSidebarContent(Individual $individual): bool
95
+	{
96
+		return true;
97
+	}
98 98
 
99
-    /**
100
-     * {@inheritDoc}
101
-     * @see \Fisharebest\Webtrees\Module\ModuleSidebarInterface::getSidebarContent()
102
-     */
103
-    public function getSidebarContent(Individual $individual): string
104
-    {
105
-        /** @var SourceStatusService $source_status_service */
106
-        $source_status_service = app(SourceStatusService::class);
99
+	/**
100
+	 * {@inheritDoc}
101
+	 * @see \Fisharebest\Webtrees\Module\ModuleSidebarInterface::getSidebarContent()
102
+	 */
103
+	public function getSidebarContent(Individual $individual): string
104
+	{
105
+		/** @var SourceStatusService $source_status_service */
106
+		$source_status_service = app(SourceStatusService::class);
107 107
 
108
-        $spouse_families_status = $individual->spouseFamilies()->map(
109
-            function (Family $sfamily) use ($source_status_service): array {
110
-                return [ $sfamily, $source_status_service->sourceStatusForMarriage($sfamily)];
111
-            }
112
-        )->filter(function (array $item): bool {
113
-            return $item[1]->isSet();
114
-        });
108
+		$spouse_families_status = $individual->spouseFamilies()->map(
109
+			function (Family $sfamily) use ($source_status_service): array {
110
+				return [ $sfamily, $source_status_service->sourceStatusForMarriage($sfamily)];
111
+			}
112
+		)->filter(function (array $item): bool {
113
+			return $item[1]->isSet();
114
+		});
115 115
 
116
-        return view($this->name() . '::sidebar/content', [
117
-            'module_name'               => $this->name(),
118
-            'individual'                =>  $individual,
119
-            'source_status_individual'  =>  $source_status_service->sourceStatusForRecord($individual),
120
-            'source_status_birth'       =>  $source_status_service->sourceStatusForBirth($individual),
121
-            'source_status_marriages'   =>  $spouse_families_status,
122
-            'source_status_death'       =>  $source_status_service->sourceStatusForDeath($individual)
123
-        ]);
124
-    }
116
+		return view($this->name() . '::sidebar/content', [
117
+			'module_name'               => $this->name(),
118
+			'individual'                =>  $individual,
119
+			'source_status_individual'  =>  $source_status_service->sourceStatusForRecord($individual),
120
+			'source_status_birth'       =>  $source_status_service->sourceStatusForBirth($individual),
121
+			'source_status_marriages'   =>  $spouse_families_status,
122
+			'source_status_death'       =>  $source_status_service->sourceStatusForDeath($individual)
123
+		]);
124
+	}
125 125
 
126
-    /**
127
-     * {@inheritDoc}
128
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\ModuleHookSubscriberInterface::listSubscribedHooks()
129
-     */
130
-    public function listSubscribedHooks(): array
131
-    {
132
-        return [
133
-            app()->makeWith(IsSourcedStatusHook::class, [ 'module' => $this ]),
134
-            app()->makeWith(IsSourcedStatusColumnsHook::class, [ 'module' => $this ])
135
-        ];
136
-    }
126
+	/**
127
+	 * {@inheritDoc}
128
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\ModuleHookSubscriberInterface::listSubscribedHooks()
129
+	 */
130
+	public function listSubscribedHooks(): array
131
+	{
132
+		return [
133
+			app()->makeWith(IsSourcedStatusHook::class, [ 'module' => $this ]),
134
+			app()->makeWith(IsSourcedStatusColumnsHook::class, [ 'module' => $this ])
135
+		];
136
+	}
137 137
 }
Please login to merge, or discard this patch.