Skip to content

Commit 2348f9c

Browse files
committed
Coding style
1 parent cd3bee1 commit 2348f9c

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

qa-src/Controllers/Admin/Categories.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,14 @@ public function index()
430430
);
431431
}
432432

433+
$qcountHtml = $editcategory['qcount'] == 1
434+
? qa_lang_html_sub('main/1_question', '1', '1')
435+
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']));
436+
433437
$qa_content['form']['fields']['questions'] = array(
434438
'label' => qa_lang_html('admin/total_qs'),
435439
'type' => 'static',
436-
'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' .
437-
($editcategory['qcount'] == 1
438-
? qa_lang_html_sub('main/1_question', '1', '1')
439-
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']))
440-
) . '</a>',
440+
'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' . $qcountHtml . '</a>',
441441
);
442442

443443
if ($hassubcategory && !qa_opt('allow_no_sub_category')) {
@@ -601,14 +601,12 @@ public function index()
601601

602602
foreach ($categories as $category) {
603603
if (!isset($category['parentid'])) {
604+
$qcountHtml = $category['qcount'] == 1
605+
? qa_lang_html_sub('main/1_question', '1', '1')
606+
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']));
604607
$navcategoryhtml .=
605608
'<a href="' . qa_path_html('admin/categories', array('edit' => $category['categoryid'])) . '">' .
606-
qa_html($category['title']) .
607-
'</a> - ' .
608-
($category['qcount'] == 1
609-
? qa_lang_html_sub('main/1_question', '1', '1')
610-
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']))
611-
) . '<br/>';
609+
qa_html($category['title']) . '</a> - ' . $qcountHtml . '<br/>';
612610
}
613611
}
614612

qa-src/Controllers/Admin/Points.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
namespace Q2A\Controllers\Admin;
2020

21-
use Q2A\Database\DbConnection;
2221
use Q2A\Controllers\BaseController;
22+
use Q2A\Database\DbConnection;
2323
use Q2A\Middleware\Auth\MinimumUserLevel;
2424

2525
/**

qa-src/Exceptions/ExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
namespace Q2A\Exceptions;
2020

2121
use Exception;
22-
use Q2A\Http\Exceptions\PageNotFoundException;
2322
use Q2A\Http\Exceptions\MethodNotAllowedException;
23+
use Q2A\Http\Exceptions\PageNotFoundException;
2424

2525
class ExceptionHandler
2626
{

qa-src/Notifications/Email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
namespace Q2A\Notifications;
2222

23+
use PHPMailer;
2324
use Q2A\Exceptions\FatalErrorException;
2425
use Q2A\Notifications\Mailer;
25-
use PHPMailer;
2626

2727
class Email
2828
{

0 commit comments

Comments
 (0)