]> git.mxchange.org Git - friendica.git/blobdiff - bin/daemon.php
Using method-chaining for DICE
[friendica.git] / bin / daemon.php
index ac6385cbb973fb2d7680cdc6cde4e45c326e5fbd..8ea60fa9ac79b86f247f30325e222de011c8df5c 100755 (executable)
@@ -7,6 +7,7 @@
  * This script was taken from http://php.net/manual/en/function.pcntl-fork.php
  */
 
+use Dice\Dice;
 use Friendica\Core\Config;
 use Friendica\Core\Logger;
 use Friendica\Core\Worker;
@@ -31,8 +32,7 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
 
 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');
 
 \Friendica\BaseObject::setDependencyInjection($dice);
 $a = \Friendica\BaseObject::getApp();