fix(psalm): Make psalm stricter and update baseline
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
b7235011d4
Коммит
c34083847c
|
@ -45,11 +45,13 @@ class APIController extends OCSController {
|
|||
/** @var IManager */
|
||||
protected $notificationManager;
|
||||
|
||||
public function __construct(string $appName,
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
ITimeFactory $timeFactory,
|
||||
IUserManager $userManager,
|
||||
IManager $notificationManager) {
|
||||
IManager $notificationManager,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->timeFactory = $timeFactory;
|
||||
|
@ -93,7 +95,7 @@ class APIController extends OCSController {
|
|||
}
|
||||
|
||||
$this->notificationManager->notify($notification);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (\InvalidArgumentException) {
|
||||
return new DataResponse(null, Http::STATUS_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class EndpointController extends OCSController {
|
|||
/** @var INotification $notification */
|
||||
try {
|
||||
$notification = $this->manager->prepare($notification, $language);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (\InvalidArgumentException) {
|
||||
// The app was disabled, skip the notification
|
||||
continue;
|
||||
}
|
||||
|
|
13
psalm.xml
13
psalm.xml
|
@ -1,10 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="4"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
errorBaseline="tests/psalm-baseline.xml"
|
||||
errorBaseline="tests/psalm-baseline.xml"
|
||||
errorLevel="5"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="false"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor-bin/psalm/vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="lib" />
|
||||
|
|
|
@ -1,31 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="5.7.7@e028ba46ba0d7f9a78bc3201c251e137383e145f">
|
||||
<files psalm-version="5.14.1@b9d355e0829c397b9b3b47d0c0ed042a8a70284d">
|
||||
<file src="lib/AppInfo/Application.php">
|
||||
<UndefinedClass>
|
||||
<code>IProvider</code>
|
||||
<code>IProvider</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="lib/Controller/APIController.php">
|
||||
<NullArgument>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
</NullArgument>
|
||||
</file>
|
||||
<file src="lib/Controller/EndpointController.php">
|
||||
<NullArgument>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
<code>null</code>
|
||||
</NullArgument>
|
||||
</file>
|
||||
<file src="lib/Controller/PushController.php">
|
||||
<UndefinedClass>
|
||||
<code>IProvider</code>
|
||||
|
|
Загрузка…
Ссылка в новой задаче