for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ipag\Classes;
use Ipag\Classes\Contracts\Emptiable;
use Ipag\Classes\Contracts\Serializable;
use Ipag\Classes\Traits\EmptiableTrait;
final class Authentication implements Emptiable, Serializable
{
use EmptiableTrait;
/**
* @var string
*/
private $identification;
private $identification2;
private $apiKey;
public function __construct($identification, $apiKey = null)
$this->identification = $identification;
$this->apiKey = $apiKey;
}
* @return string
public function getIdentification()
return $this->identification;
* @param string $identification
public function setIdentification($identification)
$this->identification = substr((string) $identification, 0, 50);
return $this;
public function getIdentification2()
return $this->identification2;
* @param string $identification2 the identification2
public function setIdentification2($identification2)
$this->identification2 = substr((string) $identification2, 0, 50);
public function getApiKey()
return $this->apiKey;
* @param string $apiKey
public function setApiKey($apiKey)
public function serialize()
$_user = [
'identificacao' => urlencode($this->getIdentification()),
];
$parceiro = $this->getIdentification2();
if (!empty($parceiro)) {
$_user['identificacao2'] = urlencode($parceiro);
return $_user;