Skip to content

Commit e642378

Browse files
Merge pull request #18861 from kamil-tekiela/Final-controllers
Make some controllers final
2 parents 9c81303 + 435da9c commit e642378

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/Controllers/Console/Bookmark/RefreshController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
final class RefreshController extends AbstractController
1414
{
1515
public function __construct(
16-
protected ResponseRenderer $response,
17-
protected Template $template,
16+
ResponseRenderer $response,
17+
Template $template,
1818
private Console $console,
1919
) {
2020
parent::__construct($response, $template);

src/Controllers/Database/StructureController.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@
5656
/**
5757
* Handles database structure logic
5858
*/
59-
class StructureController extends AbstractController
59+
final class StructureController extends AbstractController
6060
{
6161
/** @var int Number of tables */
62-
protected int $numTables = 0;
62+
private int $numTables = 0;
6363

6464
/** @var int Current position in the list */
65-
protected int $position = 0;
65+
private int $position = 0;
6666

6767
/** @var bool DB is information_schema */
68-
protected bool $dbIsSystemSchema = false;
68+
private bool $dbIsSystemSchema = false;
6969

7070
/** @var int Number of tables */
71-
protected int $totalNumTables = 0;
71+
private int $totalNumTables = 0;
7272

7373
/** @var mixed[] Tables in the database */
74-
protected array $tables = [];
74+
private array $tables = [];
7575

7676
/** @var bool whether stats show or not */
77-
protected bool $isShowStats = false;
77+
private bool $isShowStats = false;
7878

7979
private ReplicationInfo $replicationInfo;
8080

@@ -215,7 +215,7 @@ public function __invoke(ServerRequest $request): void
215215
}
216216

217217
/** @param mixed[] $replicaInfo */
218-
protected function displayTableList(array $replicaInfo): string
218+
private function displayTableList(array $replicaInfo): string
219219
{
220220
$html = '';
221221

@@ -530,7 +530,7 @@ protected function displayTableList(array $replicaInfo): string
530530
*
531531
* @return string HTML for tracking icon
532532
*/
533-
protected function getTrackingIcon(string $table, TrackedTable|null $trackedTable): string
533+
private function getTrackingIcon(string $table, TrackedTable|null $trackedTable): string
534534
{
535535
$trackingIcon = '';
536536
if (Tracker::isActive() && $trackedTable !== null) {
@@ -552,7 +552,7 @@ protected function getTrackingIcon(string $table, TrackedTable|null $trackedTabl
552552
*
553553
* @return mixed[]
554554
*/
555-
protected function isRowCountApproximated(
555+
private function isRowCountApproximated(
556556
array $currentTable,
557557
bool $tableIsView,
558558
): array {
@@ -597,7 +597,7 @@ protected function isRowCountApproximated(
597597
*
598598
* @return mixed[]
599599
*/
600-
protected function getReplicationStatus(array $replicaInfo, string $table): array
600+
private function getReplicationStatus(array $replicaInfo, string $table): array
601601
{
602602
$do = $ignored = false;
603603
if ($replicaInfo['status']) {
@@ -627,7 +627,7 @@ protected function getReplicationStatus(array $replicaInfo, string $table): arra
627627
* @param mixed[] $db DB to look into
628628
* @param string $truename Table name
629629
*/
630-
protected function hasTable(array $db, string $truename): bool
630+
private function hasTable(array $db, string $truename): bool
631631
{
632632
foreach ($db as $dbTable) {
633633
if (
@@ -656,7 +656,7 @@ protected function hasTable(array $db, string $truename): bool
656656
*
657657
* @return mixed[]
658658
*/
659-
protected function getStuffForEngineTypeTable(
659+
private function getStuffForEngineTypeTable(
660660
array $currentTable,
661661
int $sumSize,
662662
int $overheadSize,
@@ -776,7 +776,7 @@ protected function getStuffForEngineTypeTable(
776776
*
777777
* @return mixed[]
778778
*/
779-
protected function getValuesForAriaTable(
779+
private function getValuesForAriaTable(
780780
array $currentTable,
781781
int $sumSize,
782782
int $overheadSize,
@@ -814,7 +814,7 @@ protected function getValuesForAriaTable(
814814
*
815815
* @return mixed[]
816816
*/
817-
protected function getValuesForInnodbTable(
817+
private function getValuesForInnodbTable(
818818
array $currentTable,
819819
int $sumSize,
820820
): array {
@@ -852,7 +852,7 @@ protected function getValuesForInnodbTable(
852852
*
853853
* @return mixed[]
854854
*/
855-
protected function getValuesForMroongaTable(
855+
private function getValuesForMroongaTable(
856856
array $currentTable,
857857
int $sumSize,
858858
): array {

src/Controllers/Server/BinlogController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
/**
2121
* Handles viewing binary logs
2222
*/
23-
class BinlogController extends AbstractController
23+
final class BinlogController extends AbstractController
2424
{
2525
/**
2626
* binary log files
2727
*
2828
* @var mixed[]
2929
*/
30-
protected array $binaryLogs;
30+
private array $binaryLogs;
3131

3232
public function __construct(ResponseRenderer $response, Template $template, private DatabaseInterface $dbi)
3333
{

src/Controllers/Table/DeleteConfirmController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
final class DeleteConfirmController extends AbstractController
2525
{
2626
public function __construct(
27-
protected ResponseRenderer $response,
28-
protected Template $template,
27+
ResponseRenderer $response,
28+
Template $template,
2929
private readonly DbTableExists $dbTableExists,
3030
) {
3131
parent::__construct($response, $template);

src/Controllers/Table/DropColumnConfirmationController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
final class DropColumnConfirmationController extends AbstractController
2222
{
2323
public function __construct(
24-
protected ResponseRenderer $response,
25-
protected Template $template,
24+
ResponseRenderer $response,
25+
Template $template,
2626
private readonly DbTableExists $dbTableExists,
2727
) {
2828
parent::__construct($response, $template);

0 commit comments

Comments
 (0)