• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

marscoin / martianrepublic / 23749891416

30 Mar 2026 02:25PM UTC coverage: 8.467% (+3.2%) from 5.241%
23749891416

push

github

Martian Congress
fix: resolve all 10 PHPStan errors + add 37 new tests

Fixes:
- DashboardController: undefined $user/$citizen in showReports/showCamera
- AiHelperController: env() → config() for cached config safety
- BADS models: add return type hints so Larastan resolves relations
- Ballots model: add return type hints for proposal/user relations
- ErrorTriageMail: fix regex delimiter and add unicode flag
- services.php: add openrouter config block

New test suites (37 tests, 97 assertions):
- AcademyTest: 10 article page loads + 404 handling
- ForumTest: categories, threads, posts, ordering, proposal linkage
- CongressTest: ballot relations, pendingForUser, controller methods
- InstrumentTest: chain of trust, calibration, attestations, soft delete
- AiHelperTest: validation, error triage mail, severity extraction

Total: 79 tests, 161 assertions, 0 PHPStan errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

14 of 21 new or added lines in 8 files covered. (66.67%)

1257 existing lines in 18 files now uncovered.

445 of 5256 relevant lines covered (8.47%)

1.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/Http/Controllers/Planet/MapController.php
1
<?php
2
namespace App\Http\Controllers\Planet;
3

4
use App\Http\Controllers\Controller;
5
use Illuminate\Http\Request;
6
use Illuminate\Support\Facades\Auth;
7
use App\Models\Profile;
8
use App\Models\Feed;
9
use App\Models\IPFSRoot;
10
use App\Models\User;
11
use App\Models\HDWallet;
12
use App\Models\CivicWallet;
13
use App\Models\Proposals;
14
use Illuminate\Support\Facades\View;
15
use App\Includes\jsonRPCClient;
16
use App\Includes\AppHelper;
17
use Illuminate\Support\Facades\DB;
18
use Illuminate\Support\Facades\Log;
19

20
class MapController extends Controller
21
{
22

23
        /**
24
         * Setup the layout used by the controller.
25
         *
26
         * @return void
27
         */
28

29
        public function __construct()
×
30
        {
31
        }
×
32

33

34
        //Get all inventory data and display table
35
        //
36
    public function showAll()
×
37
        {
38
                $view = View::make('planet.map');
×
39

40
                if (Auth::check()) {
×
41
                        $uid = Auth::user()->id;
×
UNCOV
42
                        $profile = Profile::where('userid', '=', $uid)->first();
×
43

44
                        if (!$profile) {
×
UNCOV
45
                                return redirect('/twofa');
×
46
                        } else {
47
                                if ($profile->openchallenge == 1 || is_null($profile->openchallenge)) {
×
UNCOV
48
                                        return redirect('/twofachallenge');
×
49
                                }
50
                        }
51
                        $view->isCitizen = $profile->citizen;
×
52
                        $view->isGP  = $profile->general_public;
×
53
                        $view->wallet_open = $profile->civic_wallet_open;
×
54
                } else {
UNCOV
55
                        $view->isCitizen = false;
×
UNCOV
56
                        $view->isGP = false;
×
UNCOV
57
                        $view->wallet_open = false;
×
58
                }
59

UNCOV
60
                return $view;
×
61

62
    }
63

UNCOV
64
        public function embed()
×
65
        {
66
                $view = View::make('planet.embed');
×
UNCOV
67
                return $view;
×
68

69
        }
70

71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc