X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FConsole%2FTypo.php;h=a3e9b770505b6873540c0d9ba10aae6bdcacd227;hb=f23ecaff6af1982112469f90d6bcdf0408b0f22e;hp=855c1705c2e19fc33924110436aade1b699bdf63;hpb=e9f0c4dbfb4a7c8732e7c4408b10941ae9efa2c9;p=friendica.git diff --git a/src/Console/Typo.php b/src/Console/Typo.php index 855c1705c2..a3e9b77050 100644 --- a/src/Console/Typo.php +++ b/src/Console/Typo.php @@ -1,21 +1,38 @@ . + * + */ namespace Friendica\Console; -use Friendica\Core\Config\Configuration; +use Friendica\Core\Config\Capability\IManageConfigValues; /** * Tired of chasing typos and finding them after a commit. * Run this and quickly see if we've got any parse errors in our application files. - * - * @author Hypolite Petovan */ class Typo extends \Asika\SimpleConsole\Console { protected $helpOptions = ['h', 'help', '?']; /** - * @var Configuration + * @var IManageConfigValues */ private $config; @@ -36,14 +53,14 @@ HELP; return $help; } - public function __construct(Configuration $config, array $argv = null) + public function __construct(IManageConfigValues $config, array $argv = null) { parent::__construct($argv); $this->config = $config; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -88,13 +105,6 @@ HELP; $files = glob('mod/*.php'); $this->checkFiles($php_path, $files); - if ($this->getOption('v')) { - $this->out('Directory: include'); - } - - $files = glob('include/*.php'); - $this->checkFiles($php_path, $files); - if ($this->getOption('v')) { $this->out('Directory: addon'); }