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

marscoin / martianrepublic / 23804883405

31 Mar 2026 03:14PM UTC coverage: 11.195% (+1.8%) from 9.347%
23804883405

push

github

Martian Congress
refactor: Tier 1 — security fixes, route standardization, code style, docs

S9:  File upload path traversal — assert realpath() within allowed dirs,
     sanitize citizen address in file paths
S11: Citizen registry queries capped with LIMIT 100
S12: External HTTP calls — replaced file_get_contents with Http::timeout()
     in CongressController, Wallet/ApiController, AppHelper
A8:  All routes converted to Laravel 9+ array notation
     [Controller::class, 'method']
D2:  Created DEVELOPMENT.md — complete setup guide for contributors
D4:  Laravel Pint code style enforced across 211 files

Tests updated: public route assertions corrected after route syntax
standardization exposed that old string-notation routes never resolved
properly in tests.

127 tests, 251 assertions, 0 PHPStan errors.

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

302 of 3262 new or added lines in 58 files covered. (9.26%)

139 existing lines in 24 files now uncovered.

620 of 5538 relevant lines covered (11.2%)

1.54 hits per line

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

40.0
/app/Http/Controllers/Planet/MapController.php
1
<?php
2

3
namespace App\Http\Controllers\Planet;
4

5
use App\Http\Controllers\Controller;
6
use App\Models\Profile;
7
use Illuminate\Support\Facades\Auth;
8
use Illuminate\Support\Facades\View;
9

10
class MapController extends Controller
11
{
12
    /**
13
     * Setup the layout used by the controller.
14
     *
15
     * @return void
16
     */
17
    public function __construct() {}
1✔
18

19
    // Get all inventory data and display table
20
    //
21
    public function showAll()
1✔
22
    {
23
        $view = View::make('planet.map');
1✔
24

25
        if (Auth::check()) {
1✔
NEW
26
            $uid = Auth::user()->id;
×
NEW
27
            $profile = Profile::where('userid', '=', $uid)->first();
×
28

NEW
29
            if (! $profile) {
×
NEW
30
                return redirect('/twofa');
×
31
            } else {
NEW
32
                if ($profile->openchallenge == 1 || is_null($profile->openchallenge)) {
×
NEW
33
                    return redirect('/twofachallenge');
×
34
                }
35
            }
NEW
36
            $view->isCitizen = $profile->citizen;
×
NEW
37
            $view->isGP = $profile->general_public;
×
NEW
38
            $view->wallet_open = $profile->civic_wallet_open;
×
39
        } else {
40
            $view->isCitizen = false;
1✔
41
            $view->isGP = false;
1✔
42
            $view->wallet_open = false;
1✔
43
        }
44

45
        return $view;
1✔
46

47
    }
48

NEW
49
    public function embed()
×
50
    {
NEW
51
        $view = View::make('planet.embed');
×
52

NEW
53
        return $view;
×
54

55
    }
56
}
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