Skip to content

Commit c2c589b

Browse files
committed
rector fixes
1 parent 700be66 commit c2c589b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

www/PluginWizard.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
class PluginWizard
1111
{
12-
1312
/**
1413
* @throws ArchiveIllegalCompressionException
1514
* @throws ArchiveIOException
@@ -36,7 +35,7 @@ public function handle()
3635
if (!empty($_POST['use_test'])) $skeletor->addTest();
3736

3837
foreach ($_POST['components'] as $id) {
39-
list($type, /*"plugin"*/, /*base*/, $component) = array_pad(explode('_', $id, 4), 4, '');
38+
[$type, , , $component] = array_pad(explode('_', $id, 4), 4, '');
4039
if (isset($_POST['options'][$id])) {
4140
$options = array_filter(array_map('trim', explode(',', $_POST['options'][$id])));
4241
} else {
@@ -69,10 +68,4 @@ public function getEvents()
6968
{
7069
return array_map('trim', file(__DIR__ . '/../events.txt', FILE_IGNORE_NEW_LINES));
7170
}
72-
7371
}
74-
75-
76-
77-
78-

www/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<head>
2121
<title>DokuWiki Plugin Wizard</title>
2222
<script type="text/javascript">
23-
const ACTION_EVENTS = <?php echo json_encode($WIZ->getEvents()); ?>;
23+
const ACTION_EVENTS = <?php echo json_encode($WIZ->getEvents(), JSON_THROW_ON_ERROR); ?>;
2424
</script>
2525

2626
<link rel="stylesheet" href="style.css"/>
@@ -117,7 +117,7 @@
117117
<label>
118118
<span>Type:</span>
119119
<select>
120-
<?php foreach ($WIZ->getPluginTypes() as $type): ?>
120+
<?php foreach ($WIZ->getPluginTypes() as $type) : ?>
121121
<option value="<?php echo $type ?>"><?php echo ucfirst($type) ?></option>
122122
<?php endforeach; ?>
123123
</select>

0 commit comments

Comments
 (0)