src/Generator.php
public function getPerson($state_code = null)
	{
		$state_code = !empty($state_code) ? $state_code : $this->getState()->code;
		
		$person = new Entities\Person;

		$person->guid = $this->getGuid();
		$person->unique_hash = $this->getUniqueHash();
		
		$person->name = $this->getFullName(); // Returns an object with first, middle, last, and gender properties

		// @codeCoverageIgnoreStart
		if (rand(1, 100) % 5 == 0) {
			// Self employed?  Name the business after them.
			$person->company = $this->getCompanyName($person->name->last);
		} else {
			// Generate some random company name.
			$person->company = $this->getCompanyName();
		}
		// @codeCoverageIgnoreEnd

		# Primary address
		$person->address = $this->getAddress($state_code);
		
		# Secondary Address.  Mailing Address?	Use same zip code and primary address
		$person->address2 = $this->getAddress($state_code, $person->address->zip);
		
		$person->internet = $this->getInternet($person->name, $person->company);

		# Everyone has at least 2 or three phone numbers
		$person->phone	= new stdclass();
		$person->phone->home	= $this->getPhone($state_code, $person->address->zip);
		$person->phone->mobile	= $this->getPhone($state_code, $person->address->zip);
		$person->phone->work	= $this->getPhone($state_code, $person->address->zip);

		$person->ssn	= $this->getSsn($state_code);
		$person->dln	= $this->getDln($state_code);

		$person->dob	= $this->getBirthDate();

		# Payment Implements
		$person->credit_card = $this->getCreditCard();
		$person->bank_account = $this->getBank();

		return $person;
	}
public function getPerson($state_code = null)
	{
		$state_code = !empty($state_code) ? $state_code : $this->getState()->code;
		
		$person = new Entities\Person;

		$person->guid = $this->getGuid();
		$person->unique_hash = $this->getUniqueHash();
		
		$person->name = $this->getFullName(); // Returns an object with first, middle, last, and gender properties

		// @codeCoverageIgnoreStart
		if (rand(1, 100) % 5 == 0) {
			// Self employed?  Name the business after them.
			$person->company = $this->getCompanyName($person->name->last);
		} else {
			// Generate some random company name.
			$person->company = $this->getCompanyName();
		}
		// @codeCoverageIgnoreEnd

		# Primary address
		$person->address = $this->getAddress($state_code);
		
		# Secondary Address.  Mailing Address?	Use same zip code and primary address
		$person->address2 = $this->getAddress($state_code, $person->address->zip);
		
		$person->internet = $this->getInternet($person->name, $person->company);

		# Everyone has at least 2 or three phone numbers
		$person->phone	= new stdclass();
		$person->phone->home	= $this->getPhone($state_code, $person->address->zip);
		$person->phone->mobile	= $this->getPhone($state_code, $person->address->zip);
		$person->phone->work	= $this->getPhone($state_code, $person->address->zip);

		$person->ssn	= $this->getSsn($state_code);
		$person->dln	= $this->getDln($state_code);

		$person->dob	= $this->getBirthDate();

		# Payment Implements
		$person->credit_card = $this->getCreditCard();
		$person->bank_account = $this->getBank();

		return $person;
	}
public function getPerson ( $ state_code = null ) { $ state_code = ! empty ( $ state_code ) ? $ state_code : $ this -> getState ( ) -> code ; $ person = new Entities \ Person ; $ person -> guid = $ this -> getGuid ( ) ; $ person -> unique_hash = $ this -> getUniqueHash ( ) ; $ person -> name = $ this -> getFullName ( ) ; // Returns an object with first, middle, last, and gender properties // @codeCoverageIgnoreStart if ( rand ( 1 , 100 ) % 5 == 0 ) { // Self employed?  Name the business after them. $ person -> company = $ this -> getCompanyName ( $ person -> name -> last ) ; } else { // Generate some random company name. $ person -> company = $ this -> getCompanyName ( ) ; } // @codeCoverageIgnoreEnd # Primary address $ person -> address = $ this -> getAddress ( $ state_code ) ; # Secondary Address.  Mailing Address?	Use same zip code and primary address $ person -> address2 = $ this -> getAddress ( $ state_code , $ person -> address -> zip ) ; $ person -> internet = $ this -> getInternet ( $ person -> name , $ person -> company ) ; # Everyone has at least 2 or three phone numbers $ person -> phone = new stdclass ( ) ; $ person -> phone -> home = $ this -> getPhone ( $ state_code , $ person -> address -> zip ) ; $ person -> phone -> mobile = $ this -> getPhone ( $ state_code , $ person -> address -> zip ) ; $ person -> phone -> work = $ this -> getPhone ( $ state_code , $ person -> address -> zip ) ; $ person -> ssn = $ this -> getSsn ( $ state_code ) ; $ person -> dln = $ this -> getDln ( $ state_code ) ; $ person -> dob = $ this -> getBirthDate ( ) ; # Payment Implements $ person -> credit_card = $ this -> getCreditCard ( ) ; $ person -> bank_account = $ this -> getBank ( ) ; return $ person ; }
Generate a Person object with all relevant attributes.

@access public
@param mixed $state_code (default: null)
@return \joshmoody\Mock\Entities\Person
Generate a Person object with all relevant attributes .