for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kerox\Messenger\Model\ProfileSettings;
use Kerox\Messenger\Helper\ValidatorTrait;
class PaymentSettings implements \JsonSerializable
{
use ValidatorTrait;
/**
* @var null|string
*/
protected $privacyUrl;
protected $publicKey;
* @var array
protected $testUsers = [];
* @param string $privacyUrl
* @return \Kerox\Messenger\Model\ProfileSettings\PaymentSettings
public function setPrivacyUrl(string $privacyUrl): PaymentSettings
$this->isValidUrl($privacyUrl);
$this->privacyUrl = $privacyUrl;
return $this;
}
* @param string $publicKey
public function setPublicKey(string $publicKey): PaymentSettings
$this->publicKey = $publicKey;
* @param int $testUser
public function addTestUser(int $testUser): PaymentSettings
$this->testUsers[] = $testUser;
* @return array
public function jsonSerialize(): array
$json = [
'privacy_url' => $this->privacyUrl,
'public_key' => $this->publicKey,
'test_users' => $this->testUsers,
];
return array_filter($json);