From a4a23ec8b118bc3e380583cfcd7b316964a5e1f5 Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Sun, 27 Mar 2016 18:37:19 +0200 Subject: [PATCH] Add doc blocks --- src/Amqp/AmqpConfiguration.php | 35 +++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Amqp/AmqpConfiguration.php b/src/Amqp/AmqpConfiguration.php index 31fa656..9a18941 100644 --- a/src/Amqp/AmqpConfiguration.php +++ b/src/Amqp/AmqpConfiguration.php @@ -4,7 +4,10 @@ class AmqpConfiguration { - + /** + * @param array $parameters + * @return AmqpConfiguration + */ public static function parse(array $parameters) { $configuration = new self(); @@ -27,25 +30,55 @@ public static function parse(array $parameters) return $configuration; } + /** + * @param array $parameters + * @param string $key + * @param mixed|null $default + * @return mixed Value set in array or default value + */ private static function extractValueOrDefault(array $parameters, $key, $default = null) { return isset($parameters[$key]) ? $parameters[$key] : $default; } + /** + * @var string + */ private $host = 'localhost'; + /** + * @var string + */ private $vhost = '/'; + /** + * @var int + */ private $port = 5672; + /** + * @var string + */ private $user = 'guest'; + /** + * @var string + */ private $password = 'guest'; + /** + * @var string + */ private $deadLetterExchange = 'alchemy-dead-exchange'; + /** + * @var string + */ private $exchange = 'alchemy-exchange'; + /** + * @var string + */ private $queue = 'alchemy-queue'; /**