diff --git a/src/di.php b/src/di.php index 1fcd38c23..bdbb51333 100644 --- a/src/di.php +++ b/src/di.php @@ -11,11 +11,11 @@ declare(strict_types=1); */ use FOSSBilling\Environment; -use League\CommonMark\Extension\DefaultAttributes\DefaultAttributesExtension; use Lcharette\WebpackEncoreTwig\EntrypointsTwigExtension; use Lcharette\WebpackEncoreTwig\JsonManifest; use Lcharette\WebpackEncoreTwig\TagRenderer; use Lcharette\WebpackEncoreTwig\VersionedAssetsTwigExtension; +use League\CommonMark\Extension\DefaultAttributes\DefaultAttributesExtension; use RedBeanPHP\Facade; use Symfony\Bridge\Twig\Extension\TranslationExtension; use Symfony\Component\Cache\Adapter\FilesystemAdapter; @@ -877,7 +877,7 @@ $di['parse_markdown'] = $di->protect(function (?string $content, bool $addAttrib ]); if ($addAttributes) { - $parser->getEnvironment()->addExtension(new DefaultAttributesExtension); + $parser->getEnvironment()->addExtension(new DefaultAttributesExtension()); } return $parser->convert($content); diff --git a/src/index.php b/src/index.php index 041ba08d9..c89cec52f 100644 --- a/src/index.php +++ b/src/index.php @@ -44,7 +44,7 @@ if ($url === '/run-patcher') { } } -/** +/* * Workaround: Session IDs get reset when using PGs like PayPal because of the `samesite=strict` cookie attribute, resulting in the client getting logged out. * Internally the return and cancel URLs get a restore_session GET parameter attached to them with the proper session ID to restore, so we do so here. */ @@ -55,11 +55,11 @@ if (!empty($_GET['restore_session'])) { $di['session']; if (strncasecmp($url, ADMIN_PREFIX, strlen(ADMIN_PREFIX)) === 0) { - define("ADMIN_AREA", true); + define('ADMIN_AREA', true); $appUrl = str_replace(ADMIN_PREFIX, '', preg_replace('/\?.+/', '', $url)); $app = new Box_AppAdmin([], $debugBar); } else { - define("ADMIN_AREA", false); + define('ADMIN_AREA', false); $appUrl = $url; $app = new Box_AppClient([], $debugBar); } diff --git a/src/modules/Currency/Api/Guest.php b/src/modules/Currency/Api/Guest.php index ab81e70f7..c75a6d7ce 100644 --- a/src/modules/Currency/Api/Guest.php +++ b/src/modules/Currency/Api/Guest.php @@ -74,7 +74,7 @@ class Guest extends \Api_Abstract } if ($without_currency) { - return $this->select_format($p, $c['price_format']);; + return $this->select_format($p, $c['price_format']); } // Price is negative, so we place a negative symbol at the start of the format diff --git a/src/modules/Invoice/Controller/Client.php b/src/modules/Invoice/Controller/Client.php index 831ebf1fc..9528ba709 100644 --- a/src/modules/Invoice/Controller/Client.php +++ b/src/modules/Invoice/Controller/Client.php @@ -88,6 +88,7 @@ class Client implements \FOSSBilling\InjectionAwareInterface 'hash' => $hash, ]; $invoice = $api->invoice_get($data); + return $app->render('mod_invoice_thankyou', ['invoice' => $invoice]); } diff --git a/src/modules/System/Api/Admin.php b/src/modules/System/Api/Admin.php index e31245b9e..7f5ae97dc 100644 --- a/src/modules/System/Api/Admin.php +++ b/src/modules/System/Api/Admin.php @@ -158,7 +158,7 @@ class Admin extends \Api_Abstract } /** - * Returns an array containing the update info + * Returns an array containing the update info. */ public function update_info(): array { @@ -174,6 +174,7 @@ class Admin extends \Api_Abstract { $updater = $this->di['updater']; $updater->getLatestVersionInfo(null, true); + return true; } diff --git a/src/modules/Theme/Service.php b/src/modules/Theme/Service.php index 90a7bcbf2..1fbf28420 100644 --- a/src/modules/Theme/Service.php +++ b/src/modules/Theme/Service.php @@ -377,7 +377,7 @@ class Service implements InjectionAwareInterface public function getCurrentRouteTheme(): string { - if (defined("ADMIN_AREA") && ADMIN_AREA == true) { + if (defined('ADMIN_AREA') && ADMIN_AREA == true) { return $this->getCurrentAdminAreaTheme()['code']; } @@ -409,7 +409,7 @@ class Service implements InjectionAwareInterface public function getDefaultMarkdownAttributes(): array { - if (defined("ADMIN_AREA") && ADMIN_AREA == true) { + if (defined('ADMIN_AREA') && ADMIN_AREA == true) { $config = $this->getThemeConfig(false); } else { $config = $this->getThemeConfig(true); @@ -422,6 +422,7 @@ class Service implements InjectionAwareInterface unset($attributes[$class]); } } + return $attributes; } else { return [];