Skip to content

Commit a574428

Browse files
Controller: Add return type to methods
1 parent c09e587 commit a574428

7 files changed

Lines changed: 22 additions & 22 deletions

File tree

application/controllers/ConfigController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
class ConfigController extends Controller
1313
{
14-
public function init()
14+
public function init(): void
1515
{
1616
$this->assertPermission('config/modules');
1717

1818
parent::init();
1919
}
2020

21-
public function backendAction()
21+
public function backendAction(): void
2222
{
2323
$form = (new SelectBackendForm())
2424
->setIniConfig(Config::module('reporting'));
@@ -29,7 +29,7 @@ public function backendAction()
2929
$this->view->form = $form;
3030
}
3131

32-
public function mailAction()
32+
public function mailAction(): void
3333
{
3434
$form = (new ConfigureMailForm())
3535
->setIniConfig(Config::module('reporting'));

application/controllers/ReportController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ReportController extends Controller
2929
/** @var Report */
3030
protected $report;
3131

32-
public function init()
32+
public function init(): void
3333
{
3434
$reportId = $this->params->getRequired('id');
3535

@@ -46,7 +46,7 @@ public function init()
4646
$this->report = Report::fromModel($report);
4747
}
4848

49-
public function indexAction()
49+
public function indexAction(): void
5050
{
5151
$this->addTitleTab($this->report->getName());
5252

@@ -89,7 +89,7 @@ public function contentAction(): void
8989
}
9090
}
9191

92-
public function cloneAction()
92+
public function cloneAction(): void
9393
{
9494
$this->assertPermission('reporting/reports');
9595
$this->addTitleTab($this->translate('Clone Report'));
@@ -128,7 +128,7 @@ public function cloneAction()
128128
$this->addContent($form);
129129
}
130130

131-
public function editAction()
131+
public function editAction(): void
132132
{
133133
$this->assertPermission('reporting/reports');
134134
$this->addTitleTab($this->translate('Edit Report'));
@@ -170,7 +170,7 @@ public function editAction()
170170
$this->addContent($form);
171171
}
172172

173-
public function sendAction()
173+
public function sendAction(): void
174174
{
175175
$this->addTitleTab($this->translate('Send Report'));
176176

@@ -190,7 +190,7 @@ public function sendAction()
190190
$this->addContent($form);
191191
}
192192

193-
public function scheduleAction()
193+
public function scheduleAction(): void
194194
{
195195
$this->assertPermission('reporting/schedules');
196196
$this->addTitleTab($this->translate('Schedule'));
@@ -227,7 +227,7 @@ public function scheduleAction()
227227
}
228228
}
229229

230-
public function downloadAction()
230+
public function downloadAction(): void
231231
{
232232
$type = $this->params->getRequired('type');
233233

@@ -274,7 +274,7 @@ public function downloadAction()
274274
}
275275
}
276276

277-
protected function assembleActions()
277+
protected function assembleActions(): ActionBar
278278
{
279279
$reportId = $this->report->getId();
280280

application/controllers/ReportsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ReportsController extends Controller
2020
{
2121
use ReportsTimeframesAndTemplatesTabs;
2222

23-
public function indexAction()
23+
public function indexAction(): void
2424
{
2525
$this->createTabs()->activate('reports');
2626

@@ -95,7 +95,7 @@ public function indexAction()
9595
}
9696
}
9797

98-
public function newAction()
98+
public function newAction(): void
9999
{
100100
$this->assertPermission('reporting/reports');
101101
$this->addTitleTab($this->translate('New Report'));

application/controllers/TemplateController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TemplateController extends Controller
2525
/** @var Model\Template */
2626
protected $template;
2727

28-
public function init()
28+
public function init(): void
2929
{
3030
parent::init();
3131

@@ -41,7 +41,7 @@ public function init()
4141
$this->template = $template;
4242
}
4343

44-
public function indexAction()
44+
public function indexAction(): void
4545
{
4646
$this->addTitleTab($this->translate('Preview'));
4747

@@ -60,7 +60,7 @@ public function indexAction()
6060
$this->addContent($template);
6161
}
6262

63-
public function editAction()
63+
public function editAction(): void
6464
{
6565
$this->assertPermission('reporting/templates');
6666
$this->addTitleTab($this->translate('Edit Template'));

application/controllers/TemplatesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TemplatesController extends Controller
1919
{
2020
use ReportsTimeframesAndTemplatesTabs;
2121

22-
public function indexAction()
22+
public function indexAction(): void
2323
{
2424
$this->createTabs()->activate('templates');
2525

@@ -92,7 +92,7 @@ public function indexAction()
9292
}
9393
}
9494

95-
public function newAction()
95+
public function newAction(): void
9696
{
9797
$this->assertPermission('reporting/templates');
9898
$this->addTitleTab($this->translate('New Template'));

application/controllers/TimeframeController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TimeframeController extends Controller
2020
/** @var Timeframe */
2121
protected $timeframe;
2222

23-
public function init()
23+
public function init(): void
2424
{
2525
/** @var Model\Timeframe $timeframe */
2626
$timeframe = Model\Timeframe::on(Database::get())
@@ -34,7 +34,7 @@ public function init()
3434
$this->timeframe = Timeframe::fromModel($timeframe);
3535
}
3636

37-
public function editAction()
37+
public function editAction(): void
3838
{
3939
$this->assertPermission('reporting/timeframes');
4040
$this->addTitleTab($this->translate('Edit Time Frame'));

application/controllers/TimeframesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TimeframesController extends Controller
1919
{
2020
use ReportsTimeframesAndTemplatesTabs;
2121

22-
public function indexAction()
22+
public function indexAction(): void
2323
{
2424
$this->createTabs()->activate('timeframes');
2525

@@ -102,7 +102,7 @@ public function indexAction()
102102
}
103103
}
104104

105-
public function newAction()
105+
public function newAction(): void
106106
{
107107
$this->assertPermission('reporting/timeframes');
108108
$this->addTitleTab($this->translate('New Timeframe'));

0 commit comments

Comments
 (0)