Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup code #237

Merged
merged 3 commits into from
May 8, 2024
Merged
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
6 changes: 3 additions & 3 deletions application/controllers/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

class ConfigController extends Controller
{
public function init()
public function init(): void
{
$this->assertPermission('config/modules');

parent::init();
}

public function backendAction()
public function backendAction(): void
{
$form = (new SelectBackendForm())
->setIniConfig(Config::module('reporting'));
Expand All @@ -29,7 +29,7 @@ public function backendAction()
$this->view->form = $form;
}

public function mailAction()
public function mailAction(): void
{
$form = (new ConfigureMailForm())
->setIniConfig(Config::module('reporting'));
Expand Down
72 changes: 0 additions & 72 deletions application/controllers/PlugController.php.disabled

This file was deleted.

16 changes: 8 additions & 8 deletions application/controllers/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ReportController extends Controller
/** @var Report */
protected $report;

public function init()
public function init(): void
{
$reportId = $this->params->getRequired('id');

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

public function indexAction()
public function indexAction(): void
{
$this->addTitleTab($this->report->getName());

Expand Down Expand Up @@ -89,7 +89,7 @@ public function contentAction(): void
}
}

public function cloneAction()
public function cloneAction(): void
{
$this->assertPermission('reporting/reports');
$this->addTitleTab($this->translate('Clone Report'));
Expand Down Expand Up @@ -128,7 +128,7 @@ public function cloneAction()
$this->addContent($form);
}

public function editAction()
public function editAction(): void
{
$this->assertPermission('reporting/reports');
$this->addTitleTab($this->translate('Edit Report'));
Expand Down Expand Up @@ -170,7 +170,7 @@ public function editAction()
$this->addContent($form);
}

public function sendAction()
public function sendAction(): void
{
$this->addTitleTab($this->translate('Send Report'));

Expand All @@ -190,7 +190,7 @@ public function sendAction()
$this->addContent($form);
}

public function scheduleAction()
public function scheduleAction(): void
{
$this->assertPermission('reporting/schedules');
$this->addTitleTab($this->translate('Schedule'));
Expand Down Expand Up @@ -227,7 +227,7 @@ public function scheduleAction()
}
}

public function downloadAction()
public function downloadAction(): void
{
$type = $this->params->getRequired('type');

Expand Down Expand Up @@ -274,7 +274,7 @@ public function downloadAction()
}
}

protected function assembleActions()
protected function assembleActions(): ActionBar
{
$reportId = $this->report->getId();

Expand Down
126 changes: 0 additions & 126 deletions application/controllers/ReportController.php.modal

This file was deleted.

4 changes: 2 additions & 2 deletions application/controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ReportsController extends Controller
{
use ReportsTimeframesAndTemplatesTabs;

public function indexAction()
public function indexAction(): void
{
$this->createTabs()->activate('reports');

Expand Down Expand Up @@ -95,7 +95,7 @@ public function indexAction()
}
}

public function newAction()
public function newAction(): void
{
$this->assertPermission('reporting/reports');
$this->addTitleTab($this->translate('New Report'));
Expand Down
6 changes: 3 additions & 3 deletions application/controllers/TemplateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TemplateController extends Controller
/** @var Model\Template */
protected $template;

public function init()
public function init(): void
{
parent::init();

Expand All @@ -41,7 +41,7 @@ public function init()
$this->template = $template;
}

public function indexAction()
public function indexAction(): void
{
$this->addTitleTab($this->translate('Preview'));

Expand All @@ -60,7 +60,7 @@ public function indexAction()
$this->addContent($template);
}

public function editAction()
public function editAction(): void
{
$this->assertPermission('reporting/templates');
$this->addTitleTab($this->translate('Edit Template'));
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/TemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TemplatesController extends Controller
{
use ReportsTimeframesAndTemplatesTabs;

public function indexAction()
public function indexAction(): void
{
$this->createTabs()->activate('templates');

Expand Down Expand Up @@ -92,7 +92,7 @@ public function indexAction()
}
}

public function newAction()
public function newAction(): void
{
$this->assertPermission('reporting/templates');
$this->addTitleTab($this->translate('New Template'));
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/TimeframeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TimeframeController extends Controller
/** @var Timeframe */
protected $timeframe;

public function init()
public function init(): void
{
/** @var Model\Timeframe $timeframe */
$timeframe = Model\Timeframe::on(Database::get())
Expand All @@ -34,7 +34,7 @@ public function init()
$this->timeframe = Timeframe::fromModel($timeframe);
}

public function editAction()
public function editAction(): void
{
$this->assertPermission('reporting/timeframes');
$this->addTitleTab($this->translate('Edit Time Frame'));
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/TimeframesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TimeframesController extends Controller
{
use ReportsTimeframesAndTemplatesTabs;

public function indexAction()
public function indexAction(): void
{
$this->createTabs()->activate('timeframes');

Expand Down Expand Up @@ -102,7 +102,7 @@ public function indexAction()
}
}

public function newAction()
public function newAction(): void
{
$this->assertPermission('reporting/timeframes');
$this->addTitleTab($this->translate('New Timeframe'));
Expand Down
Loading
Loading