Passed
Pull Request — master (#2372)
by Rico
07:05
created
modules_v4/example-theme.disable/module.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
  * Example theme.  Here we are extending an existing theme.
21 21
  * Instead, you could extend AbstractModule and implement ModuleThemeInterface directly.
22 22
  */
23
-return new class extends MinimalTheme implements ModuleCustomInterface {
23
+return new class extends MinimalTheme implements ModuleCustomInterface
24
+{
24 25
     use ModuleCustomTrait;
25 26
 
26 27
     /**
Please login to merge, or discard this patch.
app/Module/FanChartModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@
 block discarded – undo
344 344
                     $html  .= '<div id="' . $person->xref() . '" class="fan_chart_menu">';
345 345
                     $html  .= '<div class="person_box"><div class="details1">';
346 346
                     $html .= '<div class="charts">';
347
-                    $html  .= '<a href="' . e($person->url()) . '" class="dropdown-item">' . $name. '</a>';
347
+                    $html  .= '<a href="' . e($person->url()) . '" class="dropdown-item">' . $name . '</a>';
348 348
                     foreach ($theme->individualBoxMenu($person) as $menu) {
349 349
                         $html .= '<a href="' . e($menu->getLink()) . '" class="dropdown-item p-1 ' . e($menu->getClass()) . '">' . $menu->getLabel() . '</a>';
350 350
                     }
Please login to merge, or discard this patch.
app/Functions/FunctionsEdit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -575,7 +575,7 @@
 block discarded – undo
575 575
             $html .= view('components/select', ['id' => $id, 'name' => $name, 'selected' => $value, 'options' => GedcomCodeName::getValues()]);
576 576
         } elseif ($fact === 'TYPE' && $level === '3') {
577 577
             //-- Build the selector for the Media 'TYPE' Fact
578
-            $html          .= '<select name="text[]"><option selected value="" ></option>';
578
+            $html .= '<select name="text[]"><option selected value="" ></option>';
579 579
             $selectedValue = strtolower($value);
580 580
             if (!array_key_exists($selectedValue, GedcomTag::getFileFormTypes())) {
581 581
                 $html .= '<option selected value="' . e($value) . '" >' . e($value) . '</option>';
Please login to merge, or discard this patch.
app/Services/UserService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function find($user_id): ?User
44 44
     {
45
-        return app('cache.array')->rememberForever(__CLASS__ . $user_id, static function () use ($user_id): ?User {
45
+        return app('cache.array')->rememberForever(__CLASS__ . $user_id, static function () use ($user_id) : ?User {
46 46
             return DB::table('user')
47 47
                 ->where('user_id', '=', $user_id)
48 48
                 ->get()
Please login to merge, or discard this patch.
app/Services/ModuleService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -721,7 +721,7 @@
 block discarded – undo
721 721
     public function findByName(string $module_name, bool $include_disabled = false): ?ModuleInterface
722 722
     {
723 723
         return $this->all($include_disabled)
724
-            ->filter(static function (ModuleInterface $module) use ($module_name): bool {
724
+            ->filter(static function (ModuleInterface $module) use ($module_name) : bool {
725 725
                 return $module->name() === $module_name;
726 726
             })
727 727
             ->first();
Please login to merge, or discard this patch.
app/Module/ListsMenuModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     public function getMenu(Tree $tree): ?Menu
88 88
     {
89 89
         $submenus = $this->module_service->findByComponent(ModuleListInterface::class, $tree, Auth::user())
90
-            ->map(static function (ModuleListInterface $module) use ($tree): ?Menu {
90
+            ->map(static function (ModuleListInterface $module) use ($tree) : ?Menu {
91 91
                 return $module->listMenu($tree);
92 92
             })
93 93
             ->filter()
Please login to merge, or discard this patch.
app/Module/HourglassChartModule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             if ($kcount == 0) {
298 298
                 echo "</td><td style='width:", app(ModuleThemeInterface::class)->parameter('chart-box-x'), "px'>";
299 299
             } else {
300
-                echo '<a href="#" title="' . I18N::translate('Children') . '" data-route="Descendants" data-xref="' .  e($pid) . '" data-spouses="' .  e($show_spouse) . '" data-tree="' .  e($individual->tree()->name()) . '">' . view('icons/arrow-left') . '</a>';
300
+                echo '<a href="#" title="' . I18N::translate('Children') . '" data-route="Descendants" data-xref="' . e($pid) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($individual->tree()->name()) . '">' . view('icons/arrow-left') . '</a>';
301 301
 
302 302
                 //-- move the arrow up to line up with the correct box
303 303
                 if ($show_spouse) {
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                 }
379 379
 
380 380
                 // filter out root person from children array so only siblings remain
381
-                $siblings       = $family->children()->filter(static function (Individual $x) use ($individual): bool {
381
+                $siblings = $family->children()->filter(static function (Individual $x) use ($individual): bool {
382 382
                     return $x !== $individual;
383 383
                 });
384 384
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                 echo '<td id="td_' . e($ARID) . '">';
452 452
 
453 453
                 if ($generation == $generations - 1 && $family->husband()->childFamilies()) {
454
-                    echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' .  e($ARID) . '" data-spouses="' .  e($show_spouse) . '" data-tree="' .  e($family->husband()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>';
454
+                    echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->husband()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>';
455 455
                 }
456 456
 
457 457
                 $this->printPersonPedigree($family->husband(), $generation + 1, $generations, $show_spouse);
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
                 echo '<td id="td_' . e($ARID) . '">';
483 483
 
484 484
                 if ($generation == $generations - 1 && $family->wife()->childFamilies()) {
485
-                    echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' .  e($ARID) . '" data-spouses="' .  e($show_spouse) . '" data-tree="' .  e($family->wife()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>';
485
+                    echo '<a href="#" title="' . I18N::translate('Parents') . '" data-route="Ancestors" data-xref="' . e($ARID) . '" data-spouses="' . e($show_spouse) . '" data-tree="' . e($family->wife()->tree()->name()) . '">' . view('icons/arrow-right') . '</a>';
486 486
                 }
487 487
 
488 488
                 $this->printPersonPedigree($family->wife(), $generation + 1, $generations, $show_spouse);
Please login to merge, or discard this patch.
app/Module/FrequentlyAskedQuestionsModule.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -401,19 +401,19 @@
 block discarded – undo
401 401
     private function faqsExist(Tree $tree, string $language): bool
402 402
     {
403 403
         return DB::table('block')
404
-             ->join('block_setting', 'block_setting.block_id', '=', 'block.block_id')
405
-             ->where('module_name', '=', $this->name())
406
-             ->where('setting_name', '=', 'languages')
407
-             ->where(static function (Builder $query) use ($tree): void {
408
-                 $query
409
-                     ->whereNull('gedcom_id')
410
-                     ->orWhere('gedcom_id', '=', $tree->id());
411
-             })
412
-             ->select(['setting_value AS languages'])
413
-             ->get()
414
-             ->filter(static function (stdClass $faq) use ($language): bool {
415
-                 return $faq->languages === '' || in_array($language, explode(',', $faq->languages), true);
416
-             })
404
+                ->join('block_setting', 'block_setting.block_id', '=', 'block.block_id')
405
+                ->where('module_name', '=', $this->name())
406
+                ->where('setting_name', '=', 'languages')
407
+                ->where(static function (Builder $query) use ($tree): void {
408
+                    $query
409
+                        ->whereNull('gedcom_id')
410
+                        ->orWhere('gedcom_id', '=', $tree->id());
411
+                })
412
+                ->select(['setting_value AS languages'])
413
+                ->get()
414
+                ->filter(static function (stdClass $faq) use ($language): bool {
415
+                    return $faq->languages === '' || in_array($language, explode(',', $faq->languages), true);
416
+                })
417 417
             ->isNotEmpty();
418 418
     }
419 419
 }
Please login to merge, or discard this patch.