summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_admin_page.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-06-18 11:38:26 +0200
committerHarald Eilertsen <haraldei@anduin.net>2022-06-18 11:38:26 +0200
commit0e42a12a33b9bb193fa7851628edf018bd922362 (patch)
treef01c0f82d0d8399f9c502d769c8e182e3b6df153 /includes/admin/views/giglog_admin_page.php
parentc0ff4d1d2ca7e4226d718bf11a636f431c470fe6 (diff)
downloadgigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.tar.gz
gigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.tar.bz2
gigologadmin-0e42a12a33b9bb193fa7851628edf018bd922362.zip
Add phpcs config and do automatic fixups.
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r--includes/admin/views/giglog_admin_page.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 7da93de..f3eaa87 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -5,31 +5,29 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
-if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
+if ( ! class_exists( 'GiglogAdmin_AdminPage' ) ) {
require_once __DIR__ . '/../../venue.php';
require_once __DIR__ . '/_concerts_table.php';
require_once __DIR__ . '/_edit_concert_form.php';
require_once __DIR__ . '/_new_venue_form.php';
- class GiglogAdmin_AdminPage
- {
- const STATUS_LABELS = [
+ class GiglogAdmin_AdminPage {
+
+ const STATUS_LABELS = array(
'',
'Accred Requested',
'Photo Approved',
'Text Approved',
'Photo and Text Approved',
- 'Rejected'
- ];
+ 'Rejected',
+ );
- public static function render_html() : void
- {
+ public static function render_html() : void {
$page = new self();
$page->render_page();
}
- private function render_page() : void
- {
+ private function render_page() : void {
$concerts = new GiglogAdmin_ConcertsTable();
?>
<div class="wrap">
@@ -49,40 +47,42 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
what the accreditation status is. You will get personal message if this
is really close to the concert date.</p>
- <p><?php echo $concerts->render() ?></p>
+ <p><?php echo $concerts->render(); ?></p>
</div>
<?php
- if (current_user_can('administrator')) {
+ if ( current_user_can( 'administrator' ) ) {
$edit_form = new GiglogAdmin_EditConcertForm();
- $venue_form = new GiglogAdmin_NewVenueForm(); ?>
+ $venue_form = new GiglogAdmin_NewVenueForm();
+ ?>
<div>
<h3>Form to create/edit concerts and venues</h3>
</div>
<div class="editform">
<?php echo $edit_form->render() . $venue_form->render(); ?>
- </div><?php
+ </div>
+ <?php
}
}
/**
* @return void
*/
- static function update() : void
- {
- if ('POST' !== $_SERVER['REQUEST_METHOD'])
+ static function update() : void {
+ if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
return;
+ }
- if (isset($_POST['assignitem']) || isset($_POST['unassignitem']) || isset($_POST['selectstatus'])) {
+ if ( isset( $_POST['assignitem'] ) || isset( $_POST['unassignitem'] ) || isset( $_POST['selectstatus'] ) ) {
GiglogAdmin_ConcertsTable::update();
return;
}
- if (isset($_POST['newconcert']) || isset($_POST['editconcert'])) {
+ if ( isset( $_POST['newconcert'] ) || isset( $_POST['editconcert'] ) ) {
GiglogAdmin_EditConcertForm::update();
return;
}
- if (isset($_POST['newvenue'])) {
+ if ( isset( $_POST['newvenue'] ) ) {
GiglogAdmin_NewVenueForm::update();
return;
}