Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| IsDescribable | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| description | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Field\Capability; |
| 6 | |
| 7 | trait IsDescribable |
| 8 | { |
| 9 | protected ?string $description = null; |
| 10 | |
| 11 | public function description(string $description): static |
| 12 | { |
| 13 | $this->description = $description; |
| 14 | |
| 15 | return $this; |
| 16 | } |
| 17 | |
| 18 | public function getDescription(): ?string |
| 19 | { |
| 20 | return $this->description; |
| 21 | } |
| 22 | } |