for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kerox\Messenger\Model\Callback;
class Referral
{
/**
* @var mixed
*/
protected $ref;
* @var string
protected $source;
protected $type;
* Referral constructor.
*
* @param $ref
* @param string $source
* @param string $type
public function __construct($ref, string $source, string $type)
$this->ref = $ref;
$this->source = $source;
$this->type = $type;
}
* @return mixed
public function getRef()
return $this->ref;
* @return string
public function getSource(): string
return $this->source;
public function getType(): string
return $this->type;
* @param array $payload
* @return static
public static function create(array $payload)
return new static($payload['ref'], $payload['source'], $payload['type']);