Using method-chaining for DICE

This commit is contained in:
Philipp Holzer
2019-08-05 09:02:55 +02:00
parent a66580444f
commit 9682cc440c
9 changed files with 27 additions and 25 deletions

View File

@@ -32,6 +32,7 @@
*
*/
use Dice\Dice;
use Friendica\App\Mode;
use Friendica\BaseObject;
use Friendica\Util\ExAuth;
@@ -52,8 +53,7 @@ chdir($directory);
require dirname(__DIR__) . '/vendor/autoload.php';
$dice = new \Dice\Dice();
$dice = $dice->addRules(include __DIR__ . '/../static/dependencies.config.php');
$dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php');
BaseObject::setDependencyInjection($dice);
$appMode = $dice->create(Mode::class);