Apply PHP Code Styling & Quality Changes (#1793)

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
This commit is contained in:
FOSSBilling BotandFOSSBilling Bot authored and GitHub committed 2023-11-08 06:51:20 +00:00
1 parent a64b5e6821
commit 9e85bcecef
4 files changed
+8 -10

No files matched your search

-1
View File
@@ -795,7 +795,6 @@ class Admin extends \Api_Abstract
return true;
}
/*
* Support Knowledge Base.
*/
+1 -2
View File
@@ -90,7 +90,6 @@ class Guest extends \Api_Abstract
return $this->getService()->publicTicketReplyForGuest($publicTicket, $data['message']);
}
/*
* Support Knowledge Base Functions.
*/
@@ -98,7 +97,7 @@ class Guest extends \Api_Abstract
/**
* Get whether the knowledge base is enabled, or not.
*
* @return boolean
* @return bool
*/
public function kb_enabled()
{
+7 -5
View File
@@ -62,19 +62,19 @@ class Admin implements \FOSSBilling\InjectionAwareInterface
'uri' => $this->di['url']->adminLink('support/canned-responses'),
'index' => 400,
'class' => '',
]
]
],
],
];
if ($this->di['mod']('support')->getService()->kbEnabled()) {
array_push($nav['subpages'],
$nav['subpages'][] =
[
'location' => 'support',
'index' => 500,
'label' => __trans('Knowledge Base'),
'uri' => $this->di['url']->adminLink('support/kb'),
'class' => '',
]);
];
}
return $nav;
@@ -189,13 +189,13 @@ class Admin implements \FOSSBilling\InjectionAwareInterface
return $app->render('mod_support_canned_category', ['category' => $c]);
}
/*
* Support Knowledge Base.
*/
public function get_kb_index(\Box_App $app)
{
$this->di['is_admin_logged'];
return $app->render('mod_support_kb_index');
}
@@ -203,6 +203,7 @@ class Admin implements \FOSSBilling\InjectionAwareInterface
{
$api = $this->di['api_admin'];
$post = $api->support_kb_article_get(['id' => $id]);
return $app->render('mod_support_kb_article', ['post' => $post]);
}
@@ -210,6 +211,7 @@ class Admin implements \FOSSBilling\InjectionAwareInterface
{
$api = $this->di['api_admin'];
$cat = $api->support_kb_category_get(['id' => $id]);
return $app->render('mod_support_kb_category', ['category' => $cat]);
}
}
-2
View File
@@ -1501,7 +1501,6 @@ class Service implements \FOSSBilling\InjectionAwareInterface
return true;
}
/*
* Knowledge Base Functions.
*/
@@ -1832,5 +1831,4 @@ class Service implements \FOSSBilling\InjectionAwareInterface
return $this->di['db']->findOne('SupportKbArticleCategory', 'slug = :slug', $bindings);
}
}