Skip to content

Commit

Permalink
Add phpDoc and update phpstan-baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Sep 26, 2024
1 parent 6e1fa2c commit 137f4ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
6 changes: 3 additions & 3 deletions library/Reporting/Web/Forms/ReportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ReportForm extends CompatForm
{
use ProvidedReports;

/** @var ?int */
protected $id;

/** @var string Label to use for the submit button */
Expand Down Expand Up @@ -107,7 +108,7 @@ public function hasBeenSubmitted(): bool
);
}

protected function assemble()
protected function assemble(): void
{
$this->addElement('text', 'name', [
'required' => true,
Expand Down Expand Up @@ -179,7 +180,6 @@ protected function assemble()

if (isset($values['reportlet'])) {
$config = new Form();
// $config->populate($this->getValues());

/** @var \Icinga\Module\Reporting\Hook\ReportHook $reportlet */
$reportlet = new $values['reportlet']();
Expand Down Expand Up @@ -218,7 +218,7 @@ protected function assemble()
}
}

public function onSuccess()
public function onSuccess(): void
{
$db = Database::get();

Expand Down
25 changes: 5 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ parameters:
count: 1
path: application/forms/SelectBackendForm.php

-
message: "#^Call to an undefined method React\\\\Promise\\\\PromiseInterface\\:\\:otherwise\\(\\)\\.$#"
count: 1
path: library/Reporting/Actions/SendMail.php

-
message: "#^Method Icinga\\\\Module\\\\Reporting\\\\Actions\\\\SendMail\\:\\:execute\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -680,31 +685,11 @@ parameters:
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Method Icinga\\\\Module\\\\Reporting\\\\Web\\\\Forms\\\\ReportForm\\:\\:assemble\\(\\) has no return type specified\\.$#"
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Method Icinga\\\\Module\\\\Reporting\\\\Web\\\\Forms\\\\ReportForm\\:\\:fromId\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Method Icinga\\\\Module\\\\Reporting\\\\Web\\\\Forms\\\\ReportForm\\:\\:listReports\\(\\) has no return type specified\\.$#"
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Method Icinga\\\\Module\\\\Reporting\\\\Web\\\\Forms\\\\ReportForm\\:\\:onSuccess\\(\\) has no return type specified\\.$#"
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Property Icinga\\\\Module\\\\Reporting\\\\Web\\\\Forms\\\\ReportForm\\:\\:\\$id has no type specified\\.$#"
count: 1
path: library/Reporting/Web/Forms/ReportForm.php

-
message: "#^Call to an undefined method object\\:\\:execute\\(\\)\\.$#"
count: 1
Expand Down

0 comments on commit 137f4ac

Please sign in to comment.