Code style, remove unnecessary comments and remove unused code

This commit is contained in:
Visman 2020-11-27 14:57:54 +07:00
parent f634b37ee2
commit d5836d258c
19 changed files with 8 additions and 50 deletions

View file

@ -57,7 +57,7 @@ class Container
*/
public function __get(string $id) /* : mixed */
{
if (\array_key_exists($id, $this->instances)) { //???? isset($this->instances[$id]) ||
if (\array_key_exists($id, $this->instances)) {
return $this->instances[$id];
} elseif (false !== \strpos($id, '.')) {
$tree = \explode('.', $id);

View file

@ -131,7 +131,6 @@ class Bans extends Admin
$form['sets']['search-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Ban search info'),
],
],
@ -294,16 +293,6 @@ class Bans extends Admin
'info' => __('Expire date help'),
'value' => $data['expire'] ?? null,
];
/*
$yn = [1 => __('Yes'), 0 => __('No')];
$fields['o_default_dst'] = [
'type' => 'radio',
'value' => $config->o_default_dst,
'values' => $yn,
'caption' => __('DST label'),
'info' => __('DST help'),
];
*/
$form['sets']['ban-exp'] = [
'legend' => __('Message expiry subhead'),
'fields' => $fields,

View file

@ -221,7 +221,6 @@ class Categories extends Admin
'del-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Delete category warn'),
'html' => true,
],

View file

@ -76,7 +76,6 @@ class Censoring extends Admin
'onoff-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Censoring info'),
'html' => true,
],

View file

@ -159,7 +159,6 @@ class Forums extends Admin
$form['sets']["category{$forum->cat_id}-info"] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => $forum->cat_name,
],
],
@ -307,7 +306,6 @@ class Forums extends Admin
[
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Delete forum warn'),
'html' => true,
],
@ -522,7 +520,6 @@ class Forums extends Admin
$form['sets']['forum-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Group permissions info', $this->c->Router->link('AdminGroups'), __('User groups')),
'html' => true,
],

View file

@ -379,7 +379,6 @@ class Groups extends Admin
$form['sets']['def-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Group settings info'),
],
],
@ -637,7 +636,6 @@ class Groups extends Admin
$form['sets']['mod-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Moderator info'),
],
],
@ -808,7 +806,6 @@ class Groups extends Admin
$form['sets']['conf-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Confirm delete warn'),
'html' => true,
],

View file

@ -216,12 +216,10 @@ class Install extends Admin
'db-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Database setup'),
'html' => true,
],
'info2' => [
'type' => '', //????
'value' => __('Info 1'),
],
],
@ -273,12 +271,10 @@ class Install extends Admin
'adm-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Administration setup'),
'html' => true,
],
'info2' => [
'type' => '', //????
'value' => __('Info 7'),
],
],
@ -317,12 +313,10 @@ class Install extends Admin
'board-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Board setup'),
'html' => true,
],
'info2' => [
'type' => '', //????
'value' => __('Info 11'),
],
],

View file

@ -108,7 +108,6 @@ class Maintenance extends Admin
'indx-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Rebuild index info'),
'html' => true,
],
@ -145,7 +144,6 @@ class Maintenance extends Admin
'indx-info2' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Rebuild completed info'),
'html' => true,
],

View file

@ -122,7 +122,6 @@ class Reports extends Admin
$form['sets'][] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => $noZapped ? __('No new reports') : __('No zapped reports'),
],
],

View file

@ -285,9 +285,7 @@ class Update extends Admin
'update-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Update message'),
# 'html' => true,
],
],
],
@ -313,9 +311,7 @@ class Update extends Admin
'member-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Members message'),
// 'html' => true,
],
],
],

View file

@ -189,7 +189,6 @@ class Action extends Users
'info2' => [
'info' => [
'info2' => [
'type' => '', //????
'value' => __('Delete warning'),
'html' => true,
],

View file

@ -174,7 +174,6 @@ class View extends Users
$form['sets']['search-info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('User search info'),
],
],

View file

@ -96,11 +96,9 @@ class Delete extends Page
'info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Topic') . ' «' . $post->parent->censorSubject . '»',
],
'info2' => [
'type' => '', //????
'value' => __($deleteTopic ? 'Topic by' : 'Reply by', $post->poster, \ForkBB\dt($post->posted)),
'html' => true,
],

View file

@ -141,7 +141,6 @@ class Email extends Page
'email-info' => [
'info' => [
'info1' => [
'type' => '', //????
'value' => __('Email disclosure note'),
],
],

View file

@ -552,18 +552,15 @@ class Moderate extends Page
$form['sets']['info'] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => \implode('<br>', $headers),
'html' => true,
'value' => \implode('<br>', $headers),
'html' => true,
],
],
];
if ($this->firstTopic instanceof Topic) {
$form['sets']['info']['info']['info2'] = [
'type' => '', //????
'value' => __('All posts will be posted in the «%s» topic', $this->firstTopic->censorSubject),
// 'html' => true,
'value' => __('All posts will be posted in the «%s» topic', $this->firstTopic->censorSubject),
];
}

View file

@ -139,7 +139,6 @@ class Mod extends Profile
$form['sets']["category{$forum->cat_id}-info"] = [
'info' => [
'info1' => [
'type' => '', //????
'value' => $forum->cat_name,
],
],

View file

@ -60,7 +60,6 @@ class CalcStat extends Method
: $result['posted'];
}
//????
$this->model->num_replies = $numReplies;
return $this->model;

View file

@ -81,7 +81,7 @@ class Load extends Action
if (empty($data)) {
return null;
} elseif (\count($data) > 1) { // ???? невыполнимое условие?!
} elseif (\count($data) > 1) {
throw new ForkException('Multiple users found');
} else {
return $this->manager->create($data[0]);

View file

@ -158,11 +158,11 @@
<a class="f-btn f-btn-markread f-opacity" title="{!! __('Mark forum read') !!}" href="{!! $p->model->linkMarkRead !!}"><span>{!! __('All is read') !!}</span></a>
@endif
@if ($p->model->canSubscription)
@if ($p->model->is_subscribed)
@if ($p->model->is_subscribed)
<a class="f-btn f-btn-unsubscribe f-opacity" title="{!! __('Unsubscribe forum') !!}" href="{!! $p->model->linkUnsubscribe !!}"><span>{!! __('Unsubscribe') !!}</span></a>
@else
@else
<a class="f-btn f-btn-subscribe f-opacity" title="{!! __('Subscribe forum') !!}" href="{!! $p->model->linkSubscribe !!}"><span>{!! __('Subscribe') !!}</span></a>
@endif
@endif
@endif
@if ($p->model->canCreateTopic)
<a class="f-btn f-btn-create-topic" title="{!! __('Post topic') !!}" href="{!! $p->model->linkCreateTopic !!}"><span>{!! __('Post topic') !!}</span></a>