mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-09-16 20:02:01 +02:00
Widen the Rector config to the remaining class-based trees (Streaming, Public\Controllers, Ministra), keeping the templates, procedural front-controllers (Public/stream, Public/admin, Ministra/portal.php) and the streaming hot-path bootstraps out. Also document the recurring dropped-parens bug + the review grep in the config header. The resulting 107-file pass (94 Public\Controllers, 11 Streaming, 2 Ministra) was reviewed against the suite + PHPStan + the usual scans: - No dropped-parens bug this time (the assignment-in-condition pattern didn't occur in these files). - 6 locally-called private static helpers became instance methods (behaviour-preserving; all called via $this->, no static call sites); one unused private param dropped (FanoutConfig::desired $rSnapshot, call site updated). - De Morgan / ternary / dead-code simplifications; two `$x = getById()` truthy-assignments folded into the condition (no comparison, safe). PHPStan level 5 clean; suite 721 tests / 0 errors.
30 lines
771 B
PHP
30 lines
771 B
PHP
<?php
|
|
|
|
namespace XcVm\Public\Controllers\Admin;
|
|
|
|
/**
|
|
* ServerOrderController — Server Order.
|
|
*
|
|
* @renders Views/admin/server_order.php
|
|
*
|
|
* @package XC_VM_Public_Controllers_Admin
|
|
* @author Divarion_D <https://github.com/Divarion-D>
|
|
* @copyright 2025-2026 Vateron Media
|
|
* @link https://github.com/Vateron-Media/XC_VM
|
|
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
|
|
*/
|
|
|
|
class ServerOrderController extends BaseAdminController {
|
|
public function index() {
|
|
global $rServers;
|
|
|
|
$this->requirePermission();
|
|
|
|
$rOrderedServers = $rServers;
|
|
array_multisort(array_column($rOrderedServers, 'order'), SORT_ASC, $rOrderedServers);
|
|
|
|
$this->setTitle('Server Order');
|
|
$this->render('server_order', ['rOrderedServers' => $rOrderedServers]);
|
|
}
|
|
}
|