]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/Typo.php
Remove deprecated code
[friendica.git] / src / Console / Typo.php
index 216d05723285bce1e818da6b9fbd4ef3186edba1..eed0a31816331f81b6b448dfafd7f4133c7fe96f 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Friendica\Console;
 
-use Friendica\BaseObject;
+use Friendica\Core\Config\IConfig;
 
 /**
  * Tired of chasing typos and finding them after a commit.
@@ -14,6 +14,11 @@ class Typo extends \Asika\SimpleConsole\Console
 {
        protected $helpOptions = ['h', 'help', '?'];
 
+       /**
+        * @var IConfig
+        */
+       private $config;
+
        protected function getHelp()
        {
                $help = <<<HELP
@@ -31,6 +36,13 @@ HELP;
                return $help;
        }
 
+       public function __construct(IConfig $config, array $argv = null)
+       {
+               parent::__construct($argv);
+
+               $this->config = $config;
+       }
+
        protected function doExecute()
        {
                if ($this->getOption('v')) {
@@ -43,7 +55,7 @@ HELP;
                        throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
                }
 
-               $php_path = BaseObject::getApp()->getConfig()->get('config', 'php_path', 'php');
+               $php_path = $this->config->get('config', 'php_path', 'php');
 
                if ($this->getOption('v')) {
                        $this->out('Directory: src');