Skip to content

Commit

Permalink
Use ::class resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejohns committed Mar 29, 2016
1 parent 80ec759 commit 8e9b437
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Aura\Di\Container;
use Aura\Di\ContainerConfig;

use Aura\Auth\AuthFactory as Factory;
use Aura\Auth\Adapter\NullAdapter;

/**
* Config
*
Expand Down Expand Up @@ -73,17 +76,17 @@ public function define(Container $di)
$di->values['cookie'] = $this->cookie;
}

$di->params['Aura\Auth\AuthFactory']['cookie'] = $di->lazyValue('cookie');
$di->params[Factory::class]['cookie'] = $di->lazyValue('cookie');

$di->set(
'aura/auth:factory',
$di->lazyNew('Aura\Auth\AuthFactory')
$di->lazyNew(Factory::class)
);

if (! $di->has('aura/auth:adapter')) {
$di->set(
'aura/auth:adapter',
$di->lazyNew('Aura\Auth\Adapter\NullAdapter')
$di->lazyNew(NullAdapter::class)
);
}

Expand Down

0 comments on commit 8e9b437

Please sign in to comment.