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

php-bug-catcher / bug-catcher / 11066135309

27 Sep 2024 07:05AM UTC coverage: 86.646% (-0.4%) from 87.07%
11066135309

push

github

tito10047
Fix #14

3 of 8 new or added lines in 2 files covered. (37.5%)

837 of 966 relevant lines covered (86.65%)

13.37 hits per line

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

66.67
/src/Controller/AbstractController.php
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Jozef Môstka
5
 * Date: 31. 8. 2023
6
 * Time: 20:33
7
 */
8
namespace BugCatcher\Controller;
9

10
use LogicException;
11
use BugCatcher\Entity\Client\Client;
12
use BugCatcher\Entity\User;
13
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as SymfonyAbstractController;
14
use Symfony\Component\HttpFoundation\RequestStack;
15

16
class AbstractController extends SymfonyAbstractController {
17

18
        protected function getUser(): ?User {
19
                $user = parent::getUser();
4✔
20
                if ($user === null) {
4✔
21
                        return null;
×
22
                }
23
                if (!$user instanceof User) {
4✔
24
                        return throw new LogicException('The user is somehow not the expected UserInterface instance.');
×
25
                }
26

27
                return $user;
4✔
28
        }
29

30

31
}
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