Lines
100.00%
3 / 3
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | ||
| attributesFor | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 11 | final readonly class GenerationOptions | |
| 12 | { | |
| 13 | public EntityInclusionRules $inclusionRules; | |
| 14 | ||
| 15 | private AttributeFilterCollection $attributes; | |
| 16 | ||
| 17 | public function __construct( | |
| 18 | ?EntityInclusionRules $inclusionRules = null, | |
| 19 | ?AttributeFilterCollection $attributes = null, | |
| 20 | ) { | |
| 21 | $this->inclusionRules = $inclusionRules ?? EntityInclusionRules::allowingEverything(); | |
| 22 | $this->attributes = $attributes ?? AttributeFilterCollection::empty(); | |
| 23 | } | |
| 24 | ||
| 25 | public function attributesFor(string $domain): AttributeFilter | |
| 26 | { | |
| 27 | return $this->attributes->find($domain) ?? new AttributeFilter($domain); | |
| 28 | } | |
| 29 | } |