• 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

94.74
/src/Controller/Admin/NotifierSoundCrudController.php
1
<?php
2

3
namespace BugCatcher\Controller\Admin;
4

5
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
6
use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField;
7
use BugCatcher\Entity\NotifierFavicon;
8
use BugCatcher\Entity\NotifierSound;
9
use Symfony\Component\Validator\Constraints\File;
10
use Symfony\Component\Validator\Constraints\Image;
11

12
final class NotifierSoundCrudController extends NotifierCrudController
13
{
14
        public static function getEntityFqcn(): string {
15
                return NotifierSound::class;
×
16
        }
17

18
        public function configureFields(string $pageName): iterable {
19
                $fields = iterator_to_array(parent::configureFields($pageName));
2✔
20

21
                return array_merge($fields, [
2✔
22
                        FormField::addFieldset('Others'),
2✔
23
                        ImageField::new('file')
2✔
24
                                ->setBasePath('/uploads/sound/')
2✔
25
                                ->setUploadDir('public/uploads/sound/')
2✔
26
                                ->onlyOnForms()
2✔
27
                                ->setRequired(false)
2✔
28
                                ->setFileConstraints(new File(
2✔
29
                                        maxSize: '100k',
2✔
30
                                        mimeTypes: [
2✔
31
                                                'audio/mpeg',
2✔
32
                                                'audio/wav',
2✔
33
                                                'audio/ogg',
2✔
34
                                        ],
2✔
35
                                        mimeTypesMessage: 'Please upload a valid audio file'
2✔
36
                                )),
2✔
37
                ]);
2✔
38
        }
39
}
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