Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Middleware/ExAppUIL10NMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
) {
}

public function beforeOutput(Controller $controller, string $methodName, string $output) {
public function beforeOutput(Controller $controller, string $methodName, string $output): string {
$url = $this->request->getRequestUri();
$loadL10N = false;
foreach (self::routesToLoadL10N as $route) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Middleware/ExAppUiMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public function __construct(
) {
}

public function beforeOutput(Controller $controller, string $methodName, string $output) {
public function beforeOutput(Controller $controller, string $methodName, string $output): string {
if (($controller instanceof TopMenuController) && ($controller->postprocess)) {
$output = preg_replace(
$output = (string)preg_replace(
'/(href=")(\/.*?)(\/app_api\/css\/)(proxy\/.*css.*")/',
'$1/index.php/apps/app_api/$4',
$output);
foreach ($controller->jsProxyMap as $key => $value) {
$output = preg_replace(
$output = (string)preg_replace(
'/(src=")(\/.*?)(\/app_api\/js\/)(proxy_js\/' . (string)$key . '.js)(.*")/',
'$1/index.php/apps/app_api/proxy/' . $value . '.js$5',
$output,
Expand All @@ -43,7 +43,7 @@ public function beforeOutput(Controller $controller, string $methodName, string
return $output;
}

public function afterController(Controller $controller, string $methodName, Response $response) {
public function afterController(Controller $controller, string $methodName, Response $response): Response {
if (($controller instanceof TopMenuController) && ($controller->postprocess)) {
$exAppId = $this->request->getParam('appId');
$menuEntryName = $this->request->getParam('name');
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version2000Date20240120094952.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$table->addUniqueIndex(['daemon_config_name', 'port'], 'ex_apps_c_port__idx');

$table = $schema->getTable('ex_apps_daemons');
$table->changeColumn('deploy_config', [
$table->modifyColumn('deploy_config', [
'notnull' => true,
]);
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/ExAppOccService.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

declare(strict_types=1);
Expand Down Expand Up @@ -114,7 +114,7 @@
}

public function buildCommand(ExAppOccCommand $occCommand, ContainerInterface $container): Command {
return new class($occCommand, $container) extends Command {

Check failure on line 117 in lib/Service/ExAppOccService.php

View workflow job for this annotation

GitHub Actions / php-psalm-analysis (8.2)

InvalidReturnStatement

lib/Service/ExAppOccService.php:117:10: InvalidReturnStatement: The inferred type 'OCA\AppAPI\Service\_home_runner_work_app_api_app_api_lib_Service_ExAppOccService_php_117_3228' does not match the declared return type 'Symfony\Component\Console\Command\Command' for OCA\AppAPI\Service\ExAppOccService::buildCommand (see https://psalm.dev/128)
private LoggerInterface $logger;
private PublicFunctions $service;

Expand All @@ -128,7 +128,7 @@
$this->service = $this->container->get(PublicFunctions::class);
}

protected function configure() {
protected function configure(): void {
$this->setName($this->occCommand->getName());
$this->setDescription($this->occCommand->getDescription());
$this->setHidden(filter_var($this->occCommand->getHidden(), FILTER_VALIDATE_BOOLEAN));
Expand Down
8 changes: 0 additions & 8 deletions tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@
<code><![CDATA[IEventListener]]></code>
</MissingTemplateParam>
</file>
<file src="lib/Middleware/ExAppUiMiddleware.php">
<InvalidNullableReturnType>
<code><![CDATA[beforeOutput]]></code>
</InvalidNullableReturnType>
<NullableReturnStatement>
<code><![CDATA[$output]]></code>
</NullableReturnStatement>
</file>
<file src="lib/Service/ExAppOccService.php">
<InvalidReturnStatement>
<code><![CDATA[new class($occCommand, $container) extends Command {
Expand Down
Loading