| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | trait AddressAccessors |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Retrieve the User's 'address1' attribute. |
||
| 9 | * |
||
| 10 | * @return mixed |
||
| 11 | */ |
||
| 12 | public function getAddress1Attribute() |
||
| 13 | { |
||
| 14 | return $this->address->address_1 ?? null; |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Retrieve the User's 'address2' attribute. |
||
| 19 | * |
||
| 20 | * @return mixed |
||
| 21 | */ |
||
| 22 | public function getAddress2Attribute() |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Retrieve the User's 'city' attribute. |
||
| 29 | * |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | public function getCityAttribute() |
||
| 33 | { |
||
| 34 | return $this->address->city ?? null; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Retrieve the User's 'state' attribute. |
||
| 39 | * |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | public function getStateAttribute() |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Retrieve the User's 'zip' attribute. |
||
| 49 | * |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function getZipAttribute() |
||
| 55 | } |
||
| 56 | } |
||
| 57 |