Apply PHP Code Styling & Quality Changes (#1892)

* Apply PHP Code Styling & Quality Changes

* Update SentryHelper.php

---------

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Belle Aerni <belleaerni@gmail.com>
This commit is contained in:
authored and GitHub committed 2023-11-28 16:41:31 -08:00
1 parent b94d9321de
commit e640e83d58
4 files changed
+9 -12

No files matched your search

+2
View File
@@ -112,6 +112,8 @@ class SentryHelper
/**
* Here we validate that the DSN is correctly set and that error reporting is enabled before passing it off to the Sentry SDK.
* It may look a bit odd, but the DSN placeholder value here is split into two strings and concatenated so we can easily perform a `sed` replacement of the placeholder without it effecting this check
*
* @phpstan-ignore-next-line (The value is replaced during release and the check is written with this in mind.)
*/
if ($config['debug_and_monitoring']['report_errors'] && $sentryDSN !== '--replace--this--' . 'during--release--process--' && !empty($sentryDSN)) {
// Per Sentry documentation, not setting this results in the SDK simply not sending any information.
+1 -1
View File
@@ -303,7 +303,7 @@ class Service implements \FOSSBilling\InjectionAwareInterface
private function _getVarsString()
{
$str = '{% apply markdown %}' . PHP_EOL . PHP_EOL;
$str = '{% apply markdown %}' . PHP_EOL . PHP_EOL;
$str .= 'This email template was automatically generated by FOSSBilling extension. ' . PHP_EOL;
$str .= 'Template is ready to be modified. ' . PHP_EOL;
$str .= 'Email template is just like FOSSBilling theme file. ' . PHP_EOL;
+2 -3
View File
@@ -66,14 +66,13 @@ class Client extends \Api_Abstract
* Returns the login URL for a given order ID.
* If the associated server manager supports SSO, an SSO link will be given.
* Will automatically return either a reseller URL or a standard URL depending on the order config.
*
* @param array $data An array containing the API request data. Should have a key named `order_id` containing the order's ID.
*
* @return string
* @param array $data An array containing the API request data. Should have a key named `order_id` containing the order's ID.
*/
public function get_login_url(array $data): string
{
[$order, $s] = $this->_getService($data);
return $this->getService()->generateLoginUrl($s);
}
+4 -8
View File
@@ -926,10 +926,8 @@ class Service implements InjectionAwareInterface
/**
* Returns both the standard and reseller login URLs.
* Will not generate SSO links.
*
* @param \Model_ServiceHostingServer $model
*
* @return string[]|false[]
*
* @return string[]|false[]
*/
public function getMangerUrls(\Model_ServiceHostingServer $model)
{
@@ -947,10 +945,8 @@ class Service implements InjectionAwareInterface
/**
* Generates either a reseller or standard login link for a given order.
* If the server manager supports SSO, an SSO link will be returned.
*
* @param \Model_ServiceHosting $model
*
* @return string
*
* @return string
*/
public function generateLoginUrl(\Model_ServiceHosting $model)
{