| Total Complexity | 9 |
| Total Lines | 106 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class Notification { |
||
| 18 | /** |
||
| 19 | * The date of this notification |
||
| 20 | * |
||
| 21 | * @var DateTime |
||
| 22 | */ |
||
| 23 | private $date; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The transaction ID of this notification |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $transaction_id; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * The purchase ID of this notification |
||
| 34 | * |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | private $purchase_id; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * The status of this notification |
||
| 41 | * |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | private $status; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Construct and initialize an notification object |
||
| 48 | */ |
||
| 49 | 3 | public function __construct() { |
|
| 50 | |||
| 51 | 3 | } |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Get the date of this notification |
||
| 55 | * |
||
| 56 | * @return DateTime |
||
| 57 | */ |
||
| 58 | 1 | public function get_date() { |
|
| 59 | 1 | return $this->date; |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Set the date of this notification |
||
| 64 | * |
||
| 65 | * @param DateTime $date |
||
| 66 | */ |
||
| 67 | 3 | public function set_date( DateTime $date ) { |
|
| 68 | 3 | $this->date = $date; |
|
| 69 | 3 | } |
|
| 70 | |||
| 71 | /** |
||
| 72 | * Get the transaction ID |
||
| 73 | * |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | 1 | public function get_transaction_id() { |
|
| 77 | 1 | return $this->transaction_id; |
|
| 78 | } |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Set the transaction ID |
||
| 82 | * |
||
| 83 | * @param string $transaction_id |
||
| 84 | */ |
||
| 85 | 3 | public function set_transaction_id( $transaction_id ) { |
|
| 86 | 3 | $this->transaction_id = $transaction_id; |
|
| 87 | 3 | } |
|
| 88 | |||
| 89 | /** |
||
| 90 | * Get the purchase ID |
||
| 91 | * |
||
| 92 | * @return string |
||
| 93 | */ |
||
| 94 | 1 | public function get_purchase_id() { |
|
| 95 | 1 | return $this->purchase_id; |
|
| 96 | } |
||
| 97 | |||
| 98 | /** |
||
| 99 | * Set the purchase ID |
||
| 100 | * |
||
| 101 | * @param string $purchase_id |
||
| 102 | */ |
||
| 103 | 3 | public function set_purchase_id( $purchase_id ) { |
|
| 104 | 3 | $this->purchase_id = $purchase_id; |
|
| 105 | 3 | } |
|
| 106 | |||
| 107 | /** |
||
| 108 | * Get the status |
||
| 109 | * |
||
| 110 | * @return string |
||
| 111 | */ |
||
| 112 | 1 | public function get_status() { |
|
| 113 | 1 | return $this->status; |
|
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * Set the status |
||
| 118 | * |
||
| 119 | * @param string $status |
||
| 120 | */ |
||
| 121 | 3 | public function set_status( $status ) { |
|
| 123 | 3 | } |
|
| 124 | } |
||
| 125 |