Skip to content

Commit

Permalink
Some code beautification
Browse files Browse the repository at this point in the history
  • Loading branch information
ni-bschmitt committed Sep 22, 2016
1 parent be376e9 commit c53f02a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
64 changes: 32 additions & 32 deletions config/amqp.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,38 @@
'properties' => [

'production' => [
'host' => 'localhost',
'port' => 5672,
'username' => '',
'password' => '',
'vhost' => '/',
'connect_options' => [],
'ssl_options' => [],

'exchange' => 'amq.topic',
'exchange_type' => 'topic',
'exchange_passive' => false,
'exchange_durable' => true,
'exchange_auto_delete' => false,
'exchange_internal' => false,
'exchange_nowait' => false,
'exchange_properties' => [],

'queue_force_declare' => false,
'queue_passive' => false,
'queue_durable' => true,
'queue_exclusive' => false,
'queue_auto_delete' => false,
'queue_nowait' => false,
'queue_properties' => ['x-ha-policy' => ['S', 'all']],

'consumer_tag' => '',
'consumer_no_local' => false,
'consumer_no_ack' => false,
'consumer_exclusive' => false,
'consumer_nowait' => false,
'timeout' => 0,
'persistent' => false,
'host' => 'localhost',
'port' => 5672,
'username' => '',
'password' => '',
'vhost' => '/',
'connect_options' => [],
'ssl_options' => [],

'exchange' => 'amq.topic',
'exchange_type' => 'topic',
'exchange_passive' => false,
'exchange_durable' => true,
'exchange_auto_delete' => false,
'exchange_internal' => false,
'exchange_nowait' => false,
'exchange_properties' => [],

'queue_force_declare' => false,
'queue_passive' => false,
'queue_durable' => true,
'queue_exclusive' => false,
'queue_auto_delete' => false,
'queue_nowait' => false,
'queue_properties' => ['x-ha-policy' => ['S', 'all']],

'consumer_tag' => '',
'consumer_no_local' => false,
'consumer_no_ack' => false,
'consumer_exclusive' => false,
'consumer_nowait' => false,
'timeout' => 0,
'persistent' => false,
],

],
Expand Down
7 changes: 5 additions & 2 deletions src/AmqpServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

class AmqpServiceProvider extends ServiceProvider
{

/**
* Indicates if loading of the provider is deferred.
*
Expand All @@ -25,6 +26,7 @@ public function boot()
class_alias('Bschmitt\Amqp\Facades\Amqp', 'Amqp');
}
}

/**
* Register the application services.
*
Expand All @@ -38,7 +40,7 @@ public function register()
$this->app->singleton('Bschmitt\Amqp\Consumer', function ($app) {
return new Consumer(config());
});

}

/**
Expand All @@ -48,6 +50,7 @@ public function register()
*/
public function provides()
{
return ['Amqp','Bschmitt\Amqp\Publisher' , 'Bschmitt\Amqp\Consumer'];
return ['Amqp', 'Bschmitt\Amqp\Publisher', 'Bschmitt\Amqp\Consumer'];
}

}
2 changes: 1 addition & 1 deletion src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(Repository $config)
protected function extractProperties(Repository $config)
{
if ($config->has(self::REPOSITORY_KEY)) {
$data = $config->get(self::REPOSITORY_KEY);
$data = $config->get(self::REPOSITORY_KEY);
$this->properties = $data['properties'][$data['use']];
}
}
Expand Down

0 comments on commit c53f02a

Please sign in to comment.