phpmyadmin/libraries/classes/Controllers/Table/Structure/AddKeyController.php
Maurício Meneghini Fauth 613678f8f5
Replace assignments with null coalesce equal operator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 17:03:05 -03:00

42 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers\Table\Structure;
use PhpMyAdmin\Controllers\AbstractController;
use PhpMyAdmin\Controllers\Sql\SqlController;
use PhpMyAdmin\Controllers\Table\StructureController;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\ResponseRenderer;
use PhpMyAdmin\Template;
final class AddKeyController extends AbstractController
{
private SqlController $sqlController;
private StructureController $structureController;
public function __construct(
ResponseRenderer $response,
Template $template,
SqlController $sqlController,
StructureController $structureController
) {
parent::__construct($response, $template);
$this->sqlController = $sqlController;
$this->structureController = $structureController;
}
public function __invoke(ServerRequest $request): void
{
$GLOBALS['reload'] ??= null;
($this->sqlController)($request);
$GLOBALS['reload'] = true;
($this->structureController)($request);
}
}