Lines
100.00%
6 / 6
Functions and Methods
100.00%
2 / 2
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| RequestVariant | 100.00% | 6 / 6 | 100.00% | 2 / 2 | 2 | 100.00% | 1 / 1 | |||
| getEntityMapping | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 1 | |||||
| orderByName | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsbackend\RequestVariant\Repository; | |
| 4 | ||
| 5 | class RequestVariant extends \BO\Zmsbackend\Query\Base implements \BO\Zmsbackend\Query\MappingInterface | |
| 6 | { | |
| 7 | const string TABLE = 'request_variant'; | |
| 8 | const string ALIAS = 'request_variant'; | |
| 9 | ||
| 10 | /** | |
| 11 | * @return string[] | |
| 12 | * | |
| 13 | */ | |
| 14 | #[\Override] | |
| 15 | public function getEntityMapping() | |
| 16 | { | |
| 17 | return [ | |
| 18 | 'id' => self::TABLE . '.id', | |
| 19 | 'name' => self::TABLE . '.name', | |
| 20 | ]; | |
| 21 | } | |
| 22 | ||
| 23 | public function orderByName(): static | |
| 24 | { | |
| 25 | $this->query->orderBy(self::TABLE . '.name', 'ASC'); | |
| 26 | return $this; | |
| 27 | } | |
| 28 | } |