for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace pmill\RabbitRabbit;
class RabbitConfig
{
/**
* @var string
*/
protected $baseUrl;
protected $username;
protected $password;
* RabbitConfig constructor.
*
* @param array|null $config
public function __construct(array $config = null)
if ($config) {
$this->fromArray($config);
}
* @param array $array
public function fromArray(array $array): void
foreach ($array as $propertyName => $value) {
if (property_exists($this, $propertyName)) {
$this->$propertyName = $value;
* @return string
public function getBaseUrl(): string
return $this->baseUrl;
* @param string $baseUrl
public function setBaseUrl(string $baseUrl): void
$this->baseUrl = $baseUrl;
public function getUsername(): string
return $this->username;
* @param string $username
public function setUsername(string $username): void
$this->username = $username;
public function getPassword(): string
return $this->password;
* @param string $password
public function setPassword(string $password): void
$this->password = $password;