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

heimrichhannot / contao-utils-bundle / 13159583392

05 Feb 2025 02:27PM UTC coverage: 25.23% (+0.06%) from 25.17%
13159583392

push

github

web-flow
backport dca field eval (#92)

5 of 6 new or added lines in 2 files covered. (83.33%)

1482 of 5874 relevant lines covered (25.23%)

1.56 hits per line

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

95.24
/src/Dca/DcaFieldConfiguration.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Dca;
4

5
class DcaFieldConfiguration
6
{
7

8
    private string $table;
9

10
    private ?int $flag = null;
11

12
    protected bool $exclude = false;
13

14
    protected bool $search = false;
15

16
    protected bool $filter = false;
17

18
    protected bool $sorting = false;
19

20
    protected array $eval = [];
21

22
    /**
23
     * @param string $table
24
     */
25
    public function __construct(string $table)
26
    {
27
        $this->table = $table;
8✔
28
    }
29

30
    public function getTable(): string
31
    {
32
        return $this->table;
8✔
33
    }
34

35
    public function isSorting(): bool
36
    {
37
        return $this->sorting;
7✔
38
    }
39

40
    public function setSorting(bool $sorting): DcaFieldConfiguration
41
    {
42
        $this->sorting = $sorting;
6✔
43
        return $this;
6✔
44
    }
45

46
    public function getFlag(): ?int
47
    {
48
        return $this->flag;
7✔
49
    }
50

51
    public function setFlag(?int $flag): DcaFieldConfiguration
52
    {
53
        $this->flag = $flag;
5✔
54
        return $this;
5✔
55
    }
56

57
    public function isExclude(): bool
58
    {
59
        return $this->exclude;
7✔
60
    }
61

62
    public function setExclude(bool $exclude): DcaFieldConfiguration
63
    {
64
        $this->exclude = $exclude;
5✔
65
        return $this;
5✔
66
    }
67

68
    public function isSearch(): bool
69
    {
70
        return $this->search;
7✔
71
    }
72

73
    public function setSearch(bool $search): DcaFieldConfiguration
74
    {
75
        $this->search = $search;
5✔
76
        return $this;
5✔
77
    }
78

79
    public function isFilter(): bool
80
    {
81
        return $this->filter;
7✔
82
    }
83

84
    public function setFilter(bool $filter): DcaFieldConfiguration
85
    {
86
        $this->filter = $filter;
5✔
87
        return $this;
5✔
88
    }
89

90
    /**
91
     * @param string $key
92
     * @param mixed $value
93
     * @return $this
94
     */
95
    public function setEvalValue(string $key, $value): DcaFieldConfiguration
96
    {
97
        $this->eval[$key] = $value;
3✔
98
        return $this;
3✔
99
    }
100

101
    /**
102
     * @param string $key
103
     * @return mixed|null
104
     */
105
    public function getEvalValue(string $key)
106
    {
NEW
107
        return $this->eval[$key] ?? null;
×
108
    }
109

110
    public function getEval(): array
111
    {
112
        return $this->eval;
7✔
113
    }
114
}
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