Skip to content

Commit

Permalink
Coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
svivian committed Jul 31, 2020
1 parent cd3bee1 commit 2348f9c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
20 changes: 9 additions & 11 deletions qa-src/Controllers/Admin/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@ public function index()
);
}

$qcountHtml = $editcategory['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']));

$qa_content['form']['fields']['questions'] = array(
'label' => qa_lang_html('admin/total_qs'),
'type' => 'static',
'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' .
($editcategory['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($editcategory['qcount']))
) . '</a>',
'value' => '<a href="' . qa_path_html('questions/' . qa_category_path_request($categories, $editcategory['categoryid'])) . '">' . $qcountHtml . '</a>',
);

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

foreach ($categories as $category) {
if (!isset($category['parentid'])) {
$qcountHtml = $category['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']));
$navcategoryhtml .=
'<a href="' . qa_path_html('admin/categories', array('edit' => $category['categoryid'])) . '">' .
qa_html($category['title']) .
'</a> - ' .
($category['qcount'] == 1
? qa_lang_html_sub('main/1_question', '1', '1')
: qa_lang_html_sub('main/x_questions', qa_format_number($category['qcount']))
) . '<br/>';
qa_html($category['title']) . '</a> - ' . $qcountHtml . '<br/>';
}
}

Expand Down
2 changes: 1 addition & 1 deletion qa-src/Controllers/Admin/Points.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

namespace Q2A\Controllers\Admin;

use Q2A\Database\DbConnection;
use Q2A\Controllers\BaseController;
use Q2A\Database\DbConnection;
use Q2A\Middleware\Auth\MinimumUserLevel;

/**
Expand Down
2 changes: 1 addition & 1 deletion qa-src/Exceptions/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
namespace Q2A\Exceptions;

use Exception;
use Q2A\Http\Exceptions\PageNotFoundException;
use Q2A\Http\Exceptions\MethodNotAllowedException;
use Q2A\Http\Exceptions\PageNotFoundException;

class ExceptionHandler
{
Expand Down
2 changes: 1 addition & 1 deletion qa-src/Notifications/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

namespace Q2A\Notifications;

use PHPMailer;
use Q2A\Exceptions\FatalErrorException;
use Q2A\Notifications\Mailer;
use PHPMailer;

class Email
{
Expand Down

0 comments on commit 2348f9c

Please sign in to comment.