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

contributte / forms-bootstrap / #54

11 Feb 2024 08:44PM UTC coverage: 83.494% (+0.1%) from 83.353%
#54

Pull #88

github

dakorpar
fix: compatibility with nette/component-model 3.1
Pull Request #88: fix: compatibility with nette/component-model 3.1

693 of 830 relevant lines covered (83.49%)

5.72 hits per line

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

16.67
/src/Traits/FakeControlTrait.php
1
<?php declare(strict_types = 1);
2

3
namespace Contributte\FormsBootstrap\Traits;
4

5
use Nette\Forms\Control;
6
use Nette\NotImplementedException;
7

8
/**
9
 * Trait FakeControlTrait.
10
 * Implements absolute minimum of functionality to be used as a control
11
 */
12
trait FakeControlTrait
13
{
14

15
        /**
16
         * Always returns an empty array
17
         *
18
         * @return mixed[]
19
         */
20
        public function getErrors(): array
21
        {
22
                return [];
3✔
23
        }
24

25
        /**
26
         * Not supported
27
         *
28
         * @return null
29
         */
30
        public function getValue()
31
        {
32
                return null;
×
33
        }
34

35
        public function isDisabled(): bool
36
        {
37
                return true;
×
38
        }
39

40
        /**
41
         * Is control value excluded from $form->getValues() result?
42
         */
43
        public function isOmitted(): bool
44
        {
45
                return true;
×
46
        }
47

48
        /**
49
         * Not supported
50
         *
51
         * @param mixed $value
52
         */
53
        public function setValue($value): Control
54
        {
55
                throw new NotImplementedException();
×
56
        }
57

58
        /**
59
         * Do nothing
60
         *
61
         * @internal
62
         */
63
        public function validate(): void
64
        {
65
                //intentionally empty
66
        }
×
67

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