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

heimrichhannot / contao-utils-bundle / 6495495336

12 Oct 2023 12:16PM UTC coverage: 22.867% (+1.0%) from 21.909%
6495495336

Pull #70

github

koertho
more php syntax fixes
Pull Request #70: Feature/dca author field

53 of 53 new or added lines in 3 files covered. (100.0%)

1254 of 5484 relevant lines covered (22.87%)

1.55 hits per line

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

47.62
/src/Dca/AuthorFieldOptions.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Dca;
4

5
class AuthorFieldOptions
6
{
7
    /** @var string  */
8
    protected $table;
9
    /** @var string  */
10
    protected $type = AuthorField::TYPE_USER;
11
    /** @var string  */
12
    protected $fieldNamePrefix = '';
13
    /** @var bool  */
14
    protected $useDefaultLabel = true;
15
    /** @var bool  */
16
    protected $exclude = true;
17
    /** @var bool  */
18
    protected $search = true;
19
    /** @var bool  */
20
    protected $filter = true;
21

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

30

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

36
    public function getType(): string
37
    {
38
        return $this->type;
2✔
39
    }
40

41
    public function setType(string $type): AuthorFieldOptions
42
    {
43
        $this->type = $type;
×
44
        return $this;
×
45
    }
46

47
    public function hasFieldNamePrefix(): bool
48
    {
49
        return !empty($this->fieldNamePrefix);
2✔
50
    }
51

52
    public function getFieldNamePrefix(): string
53
    {
54
        return $this->fieldNamePrefix;
1✔
55
    }
56

57
    public function setFieldNamePrefix(string $fieldNamePrefix): AuthorFieldOptions
58
    {
59
        $this->fieldNamePrefix = $fieldNamePrefix;
1✔
60
        return $this;
1✔
61
    }
62

63
    public function isUseDefaultLabel(): bool
64
    {
65
        return $this->useDefaultLabel;
1✔
66
    }
67

68
    public function setUseDefaultLabel(bool $useDefaultLabel): AuthorFieldOptions
69
    {
70
        $this->useDefaultLabel = $useDefaultLabel;
×
71
        return $this;
×
72
    }
73

74
    public function isExclude(): bool
75
    {
76
        return $this->exclude;
1✔
77
    }
78

79
    public function setExclude(bool $exclude): AuthorFieldOptions
80
    {
81
        $this->exclude = $exclude;
×
82
        return $this;
×
83
    }
84

85
    public function isSearch(): bool
86
    {
87
        return $this->search;
1✔
88
    }
89

90
    public function setSearch(bool $search): AuthorFieldOptions
91
    {
92
        $this->search = $search;
×
93
        return $this;
×
94
    }
95

96
    public function isFilter(): bool
97
    {
98
        return $this->filter;
1✔
99
    }
100

101
    public function setFilter(bool $filter): AuthorFieldOptions
102
    {
103
        $this->filter = $filter;
×
104
        return $this;
×
105
    }
106
}
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