Skip to content

Commit

Permalink
Add get/set trait
Browse files Browse the repository at this point in the history
  • Loading branch information
zstein-holts committed Jun 19, 2019
1 parent 97af1c2 commit d0ffe77
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 21 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"homepage": "https://github.com/snoop0x7b/personator",
"require": {
"guzzlehttp/guzzle": "^6.0",
"ext-json": "*"
"ext-json": "*",
"rakshazi/get-set-trait": "@stable"
},
"require-dev": {
"phpunit/phpunit": "^7"
Expand Down
87 changes: 67 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/AddressRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AddressRecord {
private $resultCodes;


// Define basic fields
private $AddressExtras;
private $AddressKey;
private $AddressLine1;
Expand All @@ -26,6 +27,8 @@ class AddressRecord {
private $Reserved;
private $State;

use \Rakshazi\GetSetTrait;

// Codes can be found here: http://wiki.melissadata.com/index.php?title=Result_Code_Details#Address_Object
// AS01, AS02, and AS03 are the codes that indicate no corrections are necessary
//
Expand Down
2 changes: 2 additions & 0 deletions lib/PersonatorResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class PersonatorResult {
private $TransmissionResults;
private $Version;

use \Rakshazi\GetSetTrait;

public function __construct(string $resultJson) {
// Build class instance
foreach (json_decode($resultJson, true) as $key => $value) {
Expand Down

0 comments on commit d0ffe77

Please sign in to comment.