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

mborne / git-manager / 14820042690

04 May 2025 09:55AM UTC coverage: 63.816% (-2.1%) from 65.942%
14820042690

push

github

web-flow
Merge pull request #35 from mborne/34-database

(closes #34)

67 of 86 new or added lines in 7 files covered. (77.91%)

7 existing lines in 1 file now uncovered.

194 of 304 relevant lines covered (63.82%)

0.64 hits per line

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

0.0
/src/Controller/Api/ProjectController.php
1
<?php
2

3
namespace MBO\GitManager\Controller\Api;
4

5
use MBO\GitManager\Repository\ProjectRepository;
6
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
7
use Symfony\Component\HttpFoundation\Response;
8
use Symfony\Component\Routing\Annotation\Route;
9
use Symfony\Component\Uid\Uuid;
10

11
class ProjectController extends AbstractController
12
{
13
    #[Route('/api/projects', name: 'api_project_list')]
14
    public function list(
15
        ProjectRepository $repository,
16
    ): Response {
NEW
17
        $projects = $repository->findAll();
×
18

NEW
19
        return $this->json($projects);
×
20
    }
21

22
    #[Route('/api/projects/{id}', name: 'api_project_get')]
23
    public function get(
24
        ProjectRepository $repository,
25
        Uuid $id,
26
    ): Response {
NEW
27
        $project = $repository->find($id);
×
NEW
28
        if (is_null($project)) {
×
NEW
29
            return $this->json([
×
NEW
30
                'message' => 'Not found',
×
NEW
31
            ], 404);
×
32
        }
33

NEW
34
        return $this->json($project);
×
35
    }
36
}
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

© 2026 Coveralls, Inc