Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
| Contact | |
0.00% |
0 / 5 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSubtype | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getSubtype | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package Modules\Admin\Models |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace Modules\Admin\Models; |
| 16 | |
| 17 | /** |
| 18 | * Contact element class. |
| 19 | * |
| 20 | * Information such as phone number, email, ... |
| 21 | * |
| 22 | * @package Modules\Admin\Models |
| 23 | * @license OMS License 2.0 |
| 24 | * @link https://jingga.app |
| 25 | * @since 1.0.0 |
| 26 | */ |
| 27 | class Contact |
| 28 | { |
| 29 | /** |
| 30 | * ID. |
| 31 | * |
| 32 | * @var int |
| 33 | * @since 1.0.0 |
| 34 | */ |
| 35 | public int $id = 0; |
| 36 | |
| 37 | /** |
| 38 | * Contact element type. |
| 39 | * |
| 40 | * @var int |
| 41 | * @since 1.0.0 |
| 42 | */ |
| 43 | public int $type = ContactType::EMAIL; |
| 44 | |
| 45 | /** |
| 46 | * Contact element subtype. |
| 47 | * |
| 48 | * @var int |
| 49 | * @since 1.0.0 |
| 50 | */ |
| 51 | public int $subtype = 0; |
| 52 | |
| 53 | /** |
| 54 | * Content. |
| 55 | * |
| 56 | * @var string |
| 57 | * @since 1.0.0 |
| 58 | */ |
| 59 | public string $content = ''; |
| 60 | |
| 61 | /** |
| 62 | * Order. |
| 63 | * |
| 64 | * @var int |
| 65 | * @since 1.0.0 |
| 66 | */ |
| 67 | public int $order = 0; |
| 68 | |
| 69 | public int $account = 0; |
| 70 | |
| 71 | public string $module = ''; |
| 72 | |
| 73 | /** |
| 74 | * Get id. |
| 75 | * |
| 76 | * @return int Model id |
| 77 | * |
| 78 | * @since 1.0.0 |
| 79 | */ |
| 80 | public function getId() : int |
| 81 | { |
| 82 | return $this->id; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Set type |
| 87 | * |
| 88 | * @param int $type Type |
| 89 | * |
| 90 | * @return void |
| 91 | * |
| 92 | * @since 1.0.0 |
| 93 | */ |
| 94 | public function setType(int $type) : void |
| 95 | { |
| 96 | $this->type = $type; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Get type |
| 101 | * |
| 102 | * @return int |
| 103 | * |
| 104 | * @since 1.0.0 |
| 105 | */ |
| 106 | public function getType() : int |
| 107 | { |
| 108 | return $this->type; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Set subtype |
| 113 | * |
| 114 | * @param int $subtype Subtype |
| 115 | * |
| 116 | * @return void |
| 117 | * |
| 118 | * @since 1.0.0 |
| 119 | */ |
| 120 | public function setSubtype(int $subtype) : void |
| 121 | { |
| 122 | $this->subtype = $subtype; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Get subtype |
| 127 | * |
| 128 | * @return int |
| 129 | * |
| 130 | * @since 1.0.0 |
| 131 | */ |
| 132 | public function getSubtype() : int |
| 133 | { |
| 134 | return $this->subtype; |
| 135 | } |
| 136 | } |