From 8510bf9986fffd8af58d288a297de573e78d97a5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2017 11:34:23 -0500 Subject: [PATCH] formatting --- .../Queue/Console/ListenCommand.php | 2 +- src/Illuminate/Queue/Console/WorkCommand.php | 2 +- src/Illuminate/Queue/Queue.php | 26 +++++++++---------- src/Illuminate/Queue/QueueManager.php | 14 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Illuminate/Queue/Console/ListenCommand.php b/src/Illuminate/Queue/Console/ListenCommand.php index 481a2403a49b..58a4ec059b1e 100755 --- a/src/Illuminate/Queue/Console/ListenCommand.php +++ b/src/Illuminate/Queue/Console/ListenCommand.php @@ -83,7 +83,7 @@ protected function getQueue($connection) "queue.connections.{$connection}.queue", 'default' ); - return $this->laravel['config']->get('queue.prefix', null).$queue; + return $this->laravel['config']->get('queue.prefix').$queue; } /** diff --git a/src/Illuminate/Queue/Console/WorkCommand.php b/src/Illuminate/Queue/Console/WorkCommand.php index a87744371248..9c70fdbdab75 100644 --- a/src/Illuminate/Queue/Console/WorkCommand.php +++ b/src/Illuminate/Queue/Console/WorkCommand.php @@ -200,7 +200,7 @@ protected function getQueue($connection) "queue.connections.{$connection}.queue", 'default' ); - return $this->laravel['config']->get('queue.prefix', null).$queue; + return $this->laravel['config']->get('queue.prefix').$queue; } /** diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index 1901be1c82e3..fdccfc78db48 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -186,18 +186,7 @@ public function setConnectionName($name) } /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - public function setContainer(Container $container) - { - $this->container = $container; - } - - /** - * Set the queue prefix. + * Set the queue name prefix. * * @param string $prefix * @return $this @@ -210,7 +199,7 @@ public function setQueuePrefix($prefix = null) } /** - * Get the queue prefix. + * Get the queue name prefix. * * @return string */ @@ -218,4 +207,15 @@ public function getQueuePrefix() { return $this->queuePrefix; } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } } diff --git a/src/Illuminate/Queue/QueueManager.php b/src/Illuminate/Queue/QueueManager.php index 2938a655d655..d86ce6a4e50d 100755 --- a/src/Illuminate/Queue/QueueManager.php +++ b/src/Illuminate/Queue/QueueManager.php @@ -234,24 +234,24 @@ public function setDefaultDriver($name) } /** - * Get the name of the queue prefix. + * Get the full name for the given connection. * + * @param string $connection * @return string */ - public function getQueuePrefix() + public function getName($connection = null) { - return $this->app['config']->get('queue.prefix'); + return $connection ?: $this->getDefaultDriver(); } /** - * Get the full name for the given connection. + * Get the queue name prefix. * - * @param string $connection * @return string */ - public function getName($connection = null) + public function getQueuePrefix() { - return $connection ?: $this->getDefaultDriver(); + return $this->app['config']->get('queue.prefix'); } /**