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

php-bug-catcher / bug-catcher / 11534267277

26 Oct 2024 07:05PM UTC coverage: 87.486% (-3.3%) from 90.754%
11534267277

push

github

tito10047
fixed timezone in tests

804 of 919 relevant lines covered (87.49%)

6.24 hits per line

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

76.47
/src/Controller/Admin/RecordWithholderCrudController.php
1
<?php
2

3
namespace BugCatcher\Controller\Admin;
4

5
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
6
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
7
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
8
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
9
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
10
use EasyCorp\Bundle\EasyAdminBundle\Field\BooleanField;
11
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
12
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
13
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
14
use EasyCorp\Bundle\EasyAdminBundle\Field\UrlField;
15
use BugCatcher\Entity\Project;
16
use BugCatcher\Entity\RecordLogWithholder;
17
use BugCatcher\Form\NotifierType;
18
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
19

20
final class RecordWithholderCrudController extends AbstractCrudController
21
{
22
        public static function getEntityFqcn(): string {
23
                return RecordLogWithholder::class;
×
24
        }
25

26
        public static function getSubscribedServices(): array {
27
                $services                               = parent::getSubscribedServices();
×
28
                $services[ParameterBagInterface::class] = ParameterBagInterface::class;
×
29

30
                return $services;
×
31
        }
32

33
        public function configureCrud(Crud $crud): Crud {
34
                return parent::configureCrud($crud)
2✔
35
                        ->setEntityLabelInPlural("Withholders")
2✔
36
                        ->setEntityLabelInSingular("Withholder");
2✔
37
        }
38

39
        public function configureActions(Actions $actions): Actions {
40
                return parent::configureActions($actions);
2✔
41
        }
42

43
        public function configureFields(string $pageName): iterable {
44

45
                return [
2✔
46
                        TextField::new('name'),
2✔
47
                        TextField::new('regex'),
2✔
48
                        NumberField::new("threshold")
2✔
49
                                ->setHelp("The number of times the regex must be matched within the threshold interval to trigger a notification"),
2✔
50
                        NumberField::new("thresholdInterval")
2✔
51
                                ->setHelp("The time interval in seconds over which the threshold is calculated"),
2✔
52
                        AssociationField::new('project'),
2✔
53
                ];
2✔
54
        }
55

56

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