Passed
Push — feature/code-analysis ( e321b8...2d8a51 )
by Jonathan
13:14 queued 09:07
created
app/Module/Hooks/Hooks/SosaMissingDatatablesExtenderCollector.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,45 +25,45 @@
 block discarded – undo
25 25
  * @extends AbstractHookCollector<SosaMissingDatatablesExtenderInterface>
26 26
  */
27 27
 class SosaMissingDatatablesExtenderCollector extends AbstractHookCollector implements
28
-    SosaMissingDatatablesExtenderInterface
28
+	SosaMissingDatatablesExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Columns extender for tables of missing ancestors');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Columns extender for tables of missing ancestors');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Add additional columns to tables of missing ancestors');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Add additional columns to tables of missing ancestors');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return SosaMissingDatatablesExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return SosaMissingDatatablesExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaMissingDatatablesExtenderInterface::sosaMissingColumns()
60
-     */
61
-    public function sosaMissingColumns(iterable $records): array
62
-    {
63
-        $result = [];
64
-        foreach ($this->hooks() as $hook) {
65
-            $result += $hook->sosaMissingColumns($records);
66
-        }
67
-        return $result;
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaMissingDatatablesExtenderInterface::sosaMissingColumns()
60
+	 */
61
+	public function sosaMissingColumns(iterable $records): array
62
+	{
63
+		$result = [];
64
+		foreach ($this->hooks() as $hook) {
65
+			$result += $hook->sosaMissingColumns($records);
66
+		}
67
+		return $result;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Hooks/SosaFamilyDatatablesExtenderCollector.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,45 +25,45 @@
 block discarded – undo
25 25
  * @extends AbstractHookCollector<SosaFamilyDatatablesExtenderInterface>
26 26
  */
27 27
 class SosaFamilyDatatablesExtenderCollector extends AbstractHookCollector implements
28
-    SosaFamilyDatatablesExtenderInterface
28
+	SosaFamilyDatatablesExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Columns extender for tables of ancestors’ families');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Columns extender for tables of ancestors’ families');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Add additional columns to tables of ancestors’ families');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Add additional columns to tables of ancestors’ families');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return SosaFamilyDatatablesExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return SosaFamilyDatatablesExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaFamilyDatatablesExtenderInterface::sosaFamilyColumns()
60
-     */
61
-    public function sosaFamilyColumns(iterable $records): array
62
-    {
63
-        $result = [];
64
-        foreach ($this->hooks() as $hook) {
65
-            $result += $hook->sosaFamilyColumns($records);
66
-        }
67
-        return $result;
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaFamilyDatatablesExtenderInterface::sosaFamilyColumns()
60
+	 */
61
+	public function sosaFamilyColumns(iterable $records): array
62
+	{
63
+		$result = [];
64
+		foreach ($this->hooks() as $hook) {
65
+			$result += $hook->sosaFamilyColumns($records);
66
+		}
67
+		return $result;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Hooks/SosaIndividualDatatablesExtenderCollector.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,45 +25,45 @@
 block discarded – undo
25 25
  * @extends AbstractHookCollector<SosaIndividualDatatablesExtenderInterface>
26 26
  */
27 27
 class SosaIndividualDatatablesExtenderCollector extends AbstractHookCollector implements
28
-    SosaIndividualDatatablesExtenderInterface
28
+	SosaIndividualDatatablesExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Columns extender for tables of ancestors');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Columns extender for tables of ancestors');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Add additional columns to tables of ancestors');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Add additional columns to tables of ancestors');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return SosaIndividualDatatablesExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return SosaIndividualDatatablesExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaIndividualDatatablesExtenderInterface::sosaIndividualColumns()
60
-     */
61
-    public function sosaIndividualColumns(iterable $records): array
62
-    {
63
-        $result = [];
64
-        foreach ($this->hooks() as $hook) {
65
-            $result += $hook->sosaIndividualColumns($records);
66
-        }
67
-        return $result;
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\SosaIndividualDatatablesExtenderInterface::sosaIndividualColumns()
60
+	 */
61
+	public function sosaIndividualColumns(iterable $records): array
62
+	{
63
+		$result = [];
64
+		foreach ($this->hooks() as $hook) {
65
+			$result += $hook->sosaIndividualColumns($records);
66
+		}
67
+		return $result;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Hooks/FactSourceTextExtenderCollector.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -27,56 +27,56 @@
 block discarded – undo
27 27
  */
28 28
 class FactSourceTextExtenderCollector extends AbstractHookCollector implements FactSourceTextExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Text extender for source citations’ title');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Text extender for source citations’ title');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Extends the title of source citations with additional text or icons.');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Extends the title of source citations with additional text or icons.');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return FactSourceTextExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return FactSourceTextExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\FactSourceTextExtenderInterface::factSourcePrepend()
60
-     */
61
-    public function factSourcePrepend(Tree $tree, $fact): string
62
-    {
63
-        return $this->hooks()
64
-            ->map(
65
-                fn(FactSourceTextExtenderInterface $hook) =>
66
-                    $hook->factSourcePrepend($tree, $fact)
67
-            )->implode('');
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\FactSourceTextExtenderInterface::factSourcePrepend()
60
+	 */
61
+	public function factSourcePrepend(Tree $tree, $fact): string
62
+	{
63
+		return $this->hooks()
64
+			->map(
65
+				fn(FactSourceTextExtenderInterface $hook) =>
66
+					$hook->factSourcePrepend($tree, $fact)
67
+			)->implode('');
68
+	}
69 69
 
70
-    /**
71
-     * {@inheritDoc}
72
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\FactSourceTextExtenderInterface::factSourceAppend()
73
-     */
74
-    public function factSourceAppend(Tree $tree, $fact): string
75
-    {
76
-        return $this->hooks()
77
-            ->map(
78
-                fn(FactSourceTextExtenderInterface $hook) =>
79
-                    $hook->factSourcePrepend($tree, $fact)
80
-            )->implode('');
81
-    }
70
+	/**
71
+	 * {@inheritDoc}
72
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\FactSourceTextExtenderInterface::factSourceAppend()
73
+	 */
74
+	public function factSourceAppend(Tree $tree, $fact): string
75
+	{
76
+		return $this->hooks()
77
+			->map(
78
+				fn(FactSourceTextExtenderInterface $hook) =>
79
+					$hook->factSourcePrepend($tree, $fact)
80
+			)->implode('');
81
+	}
82 82
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Hooks/FamilyDatatablesExtenderCollector.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,45 +25,45 @@
 block discarded – undo
25 25
  * @extends AbstractHookCollector<FamilyDatatablesExtenderInterface>
26 26
  */
27 27
 class FamilyDatatablesExtenderCollector extends AbstractHookCollector implements
28
-    FamilyDatatablesExtenderInterface
28
+	FamilyDatatablesExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Columns extender for tables of families');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Columns extender for tables of families');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Add additional columns to tables of families');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Add additional columns to tables of families');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return FamilyDatatablesExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return FamilyDatatablesExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\FamilyDatatablesExtenderInterface::familyColumns()
60
-     */
61
-    public function familyColumns(iterable $records): array
62
-    {
63
-        $result = [];
64
-        foreach ($this->hooks() as $hook) {
65
-            $result += $hook->familyColumns($records);
66
-        }
67
-        return $result;
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\FamilyDatatablesExtenderInterface::familyColumns()
60
+	 */
61
+	public function familyColumns(iterable $records): array
62
+	{
63
+		$result = [];
64
+		foreach ($this->hooks() as $hook) {
65
+			$result += $hook->familyColumns($records);
66
+		}
67
+		return $result;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Hooks/IndividualDatatablesExtenderCollector.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,45 +25,45 @@
 block discarded – undo
25 25
  * @extends AbstractHookCollector<IndividualDatatablesExtenderInterface>
26 26
  */
27 27
 class IndividualDatatablesExtenderCollector extends AbstractHookCollector implements
28
-    IndividualDatatablesExtenderInterface
28
+	IndividualDatatablesExtenderInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Columns extender for tables of individuals');
37
-    }
30
+	/**
31
+	 * {@inheritDoc}
32
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::title()
33
+	 */
34
+	public function title(): string
35
+	{
36
+		return I18N::translate('Columns extender for tables of individuals');
37
+	}
38 38
 
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Add additional columns to tables of individuals');
46
-    }
39
+	/**
40
+	 * {@inheritDoc}
41
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::description()
42
+	 */
43
+	public function description(): string
44
+	{
45
+		return I18N::translate('Add additional columns to tables of individuals');
46
+	}
47 47
 
48
-    /**
49
-     * {@inheritDoc}
50
-     * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
-     */
52
-    public function hookInterface(): string
53
-    {
54
-        return IndividualDatatablesExtenderInterface::class;
55
-    }
48
+	/**
49
+	 * {@inheritDoc}
50
+	 * @see \MyArtJaub\Webtrees\Common\Hooks\AbstractHookCollector::hookInterface()
51
+	 */
52
+	public function hookInterface(): string
53
+	{
54
+		return IndividualDatatablesExtenderInterface::class;
55
+	}
56 56
 
57
-    /**
58
-     * {@inheritDoc}
59
-     * @see \MyArtJaub\Webtrees\Contracts\Hooks\IndividualDatatablesExtenderInterface::individualColumns()
60
-     */
61
-    public function individualColumns(iterable $records): array
62
-    {
63
-        $result = [];
64
-        foreach ($this->hooks() as $hook) {
65
-            $result += $hook->individualColumns($records);
66
-        }
67
-        return $result;
68
-    }
57
+	/**
58
+	 * {@inheritDoc}
59
+	 * @see \MyArtJaub\Webtrees\Contracts\Hooks\IndividualDatatablesExtenderInterface::individualColumns()
60
+	 */
61
+	public function individualColumns(iterable $records): array
62
+	{
63
+		$result = [];
64
+		foreach ($this->hooks() as $hook) {
65
+			$result += $hook->individualColumns($records);
66
+		}
67
+		return $result;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Schema/Migration0.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 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
-    {
24
+	/**
25
+	 * {@inheritDoc}
26
+	 * @see \Fisharebest\Webtrees\Schema\MigrationInterface::upgrade()
27
+	 */
28
+	public function upgrade(): void
29
+	{
30 30
 
31
-        // This migration has been superseded by migration 1.
32
-    }
31
+		// This migration has been superseded by migration 1.
32
+	}
33 33
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Schema/Migration1.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -23,28 +23,28 @@
 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
-        if (DB::schema()->hasTable('maj_hooks')) {
35
-            DB::schema()->drop('maj_hooks');
36
-        }
37
-
38
-        DB::schema()->create('maj_hook_order', static function (Blueprint $table): void {
39
-            $table->string('majho_module_name', 32);
40
-            $table->string('majho_hook_name', 64);
41
-            $table->integer('majho_hook_order')->nullable();
42
-
43
-            $table->primary(['majho_module_name', 'majho_hook_name']);
44
-        });
45
-
46
-        if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) {
47
-            DB::connection()->beginTransaction();
48
-        }
49
-    }
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
+		if (DB::schema()->hasTable('maj_hooks')) {
35
+			DB::schema()->drop('maj_hooks');
36
+		}
37
+
38
+		DB::schema()->create('maj_hook_order', static function (Blueprint $table): void {
39
+			$table->string('majho_module_name', 32);
40
+			$table->string('majho_hook_name', 64);
41
+			$table->integer('majho_hook_order')->nullable();
42
+
43
+			$table->primary(['majho_module_name', 'majho_hook_name']);
44
+		});
45
+
46
+		if ($in_transaction && !DB::connection()->getPdo()->inTransaction()) {
47
+			DB::connection()->beginTransaction();
48
+		}
49
+	}
50 50
 }
Please login to merge, or discard this patch.
app/Module/Hooks/Http/RequestHandlers/ModulesHooksPage.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -29,44 +29,44 @@
 block discarded – undo
29 29
  */
30 30
 class ModulesHooksPage implements RequestHandlerInterface
31 31
 {
32
-    use ViewResponseTrait;
32
+	use ViewResponseTrait;
33 33
 
34
-    protected HookService $hook_service;
34
+	protected HookService $hook_service;
35 35
 
36
-    /**
37
-     * Constructor for ModulesHooksPage request handler
38
-     *
39
-     * @param HookService $hook_service
40
-     */
41
-    public function __construct(HookService $hook_service)
42
-    {
43
-        $this->hook_service = $hook_service;
44
-    }
36
+	/**
37
+	 * Constructor for ModulesHooksPage request handler
38
+	 *
39
+	 * @param HookService $hook_service
40
+	 */
41
+	public function __construct(HookService $hook_service)
42
+	{
43
+		$this->hook_service = $hook_service;
44
+	}
45 45
 
46
-    /**
47
-     * {@inheritDoc}
48
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
49
-     */
50
-    public function handle(ServerRequestInterface $request): ResponseInterface
51
-    {
52
-        $this->layout = 'layouts/administration';
46
+	/**
47
+	 * {@inheritDoc}
48
+	 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
49
+	 */
50
+	public function handle(ServerRequestInterface $request): ResponseInterface
51
+	{
52
+		$this->layout = 'layouts/administration';
53 53
 
54
-        $hook_name = Validator::attributes($request)->string('hook_name', '');
55
-        $hook = $this->hook_service->find($hook_name, true);
56
-        if ($hook === null) {
57
-            throw new HttpNotFoundException(I18N::translate('The hook with name “%s” does not exist.', $hook_name));
58
-        }
54
+		$hook_name = Validator::attributes($request)->string('hook_name', '');
55
+		$hook = $this->hook_service->find($hook_name, true);
56
+		if ($hook === null) {
57
+			throw new HttpNotFoundException(I18N::translate('The hook with name “%s” does not exist.', $hook_name));
58
+		}
59 59
 
60
-        $modules = $hook->hooks()
61
-            ->sortKeys()
62
-            ->mapWithKeys(fn(HookInterface $hook) => [$hook->module()->name() => $hook->module()]);
60
+		$modules = $hook->hooks()
61
+			->sortKeys()
62
+			->mapWithKeys(fn(HookInterface $hook) => [$hook->module()->name() => $hook->module()]);
63 63
 
64
-        return $this->viewResponse('admin/components', [
65
-            'description'    => $hook->description(),
66
-            'modules'        => $modules,
67
-            'title'          => $hook->title(),
68
-            'uses_access'    => false,
69
-            'uses_sorting'   => true
70
-        ]);
71
-    }
64
+		return $this->viewResponse('admin/components', [
65
+			'description'    => $hook->description(),
66
+			'modules'        => $modules,
67
+			'title'          => $hook->title(),
68
+			'uses_access'    => false,
69
+			'uses_sorting'   => true
70
+		]);
71
+	}
72 72
 }
Please login to merge, or discard this patch.