mirror of
https://github.com/friendica/friendica
synced 2025-04-30 00:24:24 +02:00
Remove unused code
- Remove commented code - Remove unused/immediately overwritten variables - Remove extraneous parameters - Remove unreachable code - Remove duplicate array keys
This commit is contained in:
parent
0c4f8277e6
commit
4a95ca280d
42 changed files with 43 additions and 218 deletions
|
@ -84,8 +84,6 @@ class JITConfigAdapter extends BaseObject implements IConfigAdapter
|
|||
|
||||
public function set($cat, $k, $value)
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
// We store our setting values in a string variable.
|
||||
// So we have to do the conversion here so that the compare below works.
|
||||
// The exception are array values.
|
||||
|
|
|
@ -73,7 +73,6 @@ HELP;
|
|||
$this->out('Options: ' . var_export($this->options, true));
|
||||
}
|
||||
|
||||
$showHelp = false;
|
||||
$subHelp = false;
|
||||
$command = null;
|
||||
|
||||
|
@ -83,7 +82,6 @@ HELP;
|
|||
return 0;
|
||||
} elseif ((count($this->options) === 0 || $this->getOption($this->customHelpOptions) === true || $this->getOption($this->customHelpOptions) === 1) && count($this->args) === 0
|
||||
) {
|
||||
$showHelp = true;
|
||||
} elseif (count($this->args) >= 2 && $this->getArgument(0) == 'help') {
|
||||
$command = $this->getArgument(1);
|
||||
$subHelp = true;
|
||||
|
|
|
@ -47,8 +47,6 @@ HELP;
|
|||
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
|
||||
}
|
||||
|
||||
$a = \get_app();
|
||||
|
||||
$pofile = realpath($this->getArgument(0));
|
||||
|
||||
if (!file_exists($pofile)) {
|
||||
|
@ -106,7 +104,6 @@ HELP;
|
|||
}
|
||||
|
||||
if ($inv) {
|
||||
$inv = false;
|
||||
$out .= '"' . $v . '"';
|
||||
}
|
||||
|
||||
|
@ -179,7 +176,6 @@ HELP;
|
|||
}
|
||||
|
||||
if ($inv) {
|
||||
$inv = false;
|
||||
$out .= '"' . $v . '"';
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@ HELP;
|
|||
|
||||
protected function doExecute()
|
||||
{
|
||||
$a = \Friendica\BaseObject::getApp();
|
||||
|
||||
if ($this->getOption('v')) {
|
||||
$this->out('Executable: ' . $this->executable);
|
||||
$this->out('Class: ' . __CLASS__);
|
||||
|
|
|
@ -224,8 +224,6 @@ class Installer
|
|||
*/
|
||||
public function checkPHP($phppath = null, $required = false)
|
||||
{
|
||||
$passed = false;
|
||||
$passed2 = false;
|
||||
$passed3 = false;
|
||||
|
||||
if (!isset($phppath)) {
|
||||
|
@ -394,7 +392,7 @@ class Installer
|
|||
$help = '';
|
||||
$status = true;
|
||||
try {
|
||||
$xml = new DOMDocument();
|
||||
new DOMDocument();
|
||||
} catch (Exception $e) {
|
||||
$help = L10n::t('Error, XML PHP module required but not installed.');
|
||||
$status = false;
|
||||
|
|
|
@ -229,7 +229,6 @@ class NotificationsManager extends BaseObject
|
|||
*/
|
||||
private function formatNotifs(array $notifs, $ident = "")
|
||||
{
|
||||
$notif = [];
|
||||
$arr = [];
|
||||
|
||||
if (DBA::isResult($notifs)) {
|
||||
|
|
|
@ -37,7 +37,7 @@ class PConfig extends BaseObject
|
|||
if ($a->getConfigValue('system', 'config_adapter') == 'preload') {
|
||||
self::$adapter = new Config\PreloadPConfigAdapter($uid);
|
||||
} else {
|
||||
self::$adapter = new Config\JITPConfigAdapter($uid);
|
||||
self::$adapter = new Config\JITPConfigAdapter();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ class System extends BaseObject
|
|||
array_shift($trace);
|
||||
|
||||
$callstack = [];
|
||||
$counter = 0;
|
||||
$previous = ['class' => '', 'function' => ''];
|
||||
|
||||
// The ignore list contains all functions that are only wrapper functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue