]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/DocBloxErrorChecker.php
Remove deprecated code
[friendica.git] / src / Console / DocBloxErrorChecker.php
index 4393e99b18c43e65552492a3ab0a6821f5fc58ba..88c08666cac9d2ed91094dbae8421f80cfabe8ca 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace Friendica\Console;
 
+use Friendica\App;
+
 /**
  * When I installed docblox, I had the experience that it does not generate any output at all.
  * This script may be used to find that kind of problems with the documentation build process.
@@ -29,6 +31,16 @@ class DocBloxErrorChecker extends \Asika\SimpleConsole\Console
 
        protected $helpOptions = ['h', 'help', '?'];
 
+       /** @var App */
+       private $app;
+
+       public function __construct(App $app, array $argv = null)
+       {
+               parent::__construct($argv);
+
+               $this->app = $app;
+       }
+
        protected function getHelp()
        {
                $help = <<<HELP
@@ -59,7 +71,7 @@ HELP;
                        throw new \RuntimeException('DocBlox isn\'t available.');
                }
 
-               $dir = \get_app()->getBasePath();
+               $dir = $this->app->getBasePath();
 
                //stack for dirs to search
                $dirstack = [];