Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 21, 2017
1 parent 465805d commit 8510bf9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/Console/WorkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
26 changes: 13 additions & 13 deletions src/Illuminate/Queue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -210,12 +199,23 @@ public function setQueuePrefix($prefix = null)
}

/**
* Get the queue prefix.
* Get the queue name prefix.
*
* @return string
*/
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;
}
}
14 changes: 7 additions & 7 deletions src/Illuminate/Queue/QueueManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit 8510bf9

Please sign in to comment.