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

waynestate / base-site / 16841481345

08 Aug 2025 10:07PM UTC coverage: 99.13% (-0.2%) from 99.315%
16841481345

push

github

AmbyrDevelops
feat: order profiles by accessid

11 of 13 new or added lines in 2 files covered. (84.62%)

1026 of 1035 relevant lines covered (99.13%)

6.69 hits per line

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

80.0
/app/Http/Controllers/DirectoryController.php
1
<?php
2

3
/*
4
* Status: Public
5
* Description: Directory Template
6
* Default: false
7
*/
8

9
namespace App\Http\Controllers;
10

11
use Illuminate\View\View;
12
use Contracts\Repositories\ProfileRepositoryContract;
13
use Illuminate\Http\Request;
14

15
class DirectoryController extends Controller
16
{
17
    /**
18
     * Construct the controller.
19
     */
20
    public function __construct(ProfileRepositoryContract $profile)
21
    {
22
        $this->profile = $profile;
2✔
23
    }
24

25
    /**
26
     * Display directory listing view.
27
     */
28
    public function index(Request $request): View
29
    {
30
        // Parse profile config from custom fields
31
        $this->profile->parseProfileConfig($request->data['base']);
2✔
32

33
        // Determine what site to pull profiles from
34
        $site_id = $this->profile->getSiteID($request->data['base']);
2✔
35

36
        if (!empty(config('profile.group_id'))) {
2✔
37
            $profiles = $this->profile->getProfilesByGroupOrder($site_id, config('profile.group_id'), $request->data['base']['site']['subsite-folder']);
2✔
38
        } else {
39
            $profiles = $this->profile->getProfilesByGroup($site_id, $request->data['base']['site']['subsite-folder']);
2✔
40
        }
41

42
        if (!empty(config('profile.profiles_by_accessid'))) {
2✔
NEW
43
            foreach ($profiles['profiles'] as $department_name => $department) {
×
NEW
44
                $profiles['profiles'][$department_name] = $this->profile->orderProfilesById($department, config('profile.profiles_by_accessid'));
×
45
            }
46
        }
47

48
        return view('directory', merge($request->data, $profiles));
2✔
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc