From 65cbcfa8800c818e10a4bc1030b65d6d9058aed8 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 26 Jun 2024 17:22:28 +0200 Subject: [PATCH] Privatize constants Signed-off-by: Kamil Tekiela --- src/Controllers/LintController.php | 2 +- src/Display/Results.php | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Controllers/LintController.php b/src/Controllers/LintController.php index 2c056456bc..bfba70e476 100644 --- a/src/Controllers/LintController.php +++ b/src/Controllers/LintController.php @@ -20,7 +20,7 @@ use function json_encode; */ final class LintController implements InvocableController { - public const EDITOR_SQL_PREFIX = [ + private const EDITOR_SQL_PREFIX = [ 'event' => "DELIMITER $$ CREATE EVENT `a` ON SCHEDULE EVERY MINUTE DO\n", 'routine' => "DELIMITER $$ CREATE PROCEDURE `a`()\n", 'trigger' => "DELIMITER $$ CREATE TRIGGER `a` AFTER INSERT ON `b` FOR EACH ROW\n", diff --git a/src/Display/Results.php b/src/Display/Results.php index 52d1ef3870..e2c606c993 100644 --- a/src/Display/Results.php +++ b/src/Display/Results.php @@ -86,10 +86,10 @@ use function trim; */ class Results { - public const POSITION_LEFT = 'left'; - public const POSITION_RIGHT = 'right'; - public const POSITION_BOTH = 'both'; - public const POSITION_NONE = 'none'; + private const POSITION_LEFT = 'left'; + private const POSITION_RIGHT = 'right'; + private const POSITION_BOTH = 'both'; + private const POSITION_NONE = 'none'; public const DISPLAY_FULL_TEXT = 'F'; public const DISPLAY_PARTIAL_TEXT = 'P'; @@ -101,15 +101,14 @@ class Results public const GEOMETRY_DISP_WKT = 'WKT'; public const GEOMETRY_DISP_WKB = 'WKB'; - public const SMART_SORT_ORDER = 'SMART'; - public const ASCENDING_SORT_DIR = 'ASC'; - public const DESCENDING_SORT_DIR = 'DESC'; + private const SMART_SORT_ORDER = 'SMART'; + private const ASCENDING_SORT_DIR = 'ASC'; + private const DESCENDING_SORT_DIR = 'DESC'; - public const TABLE_TYPE_INNO_DB = 'InnoDB'; public const ALL_ROWS = 'all'; - public const ACTION_LINK_CONTENT_ICONS = 'icons'; - public const ACTION_LINK_CONTENT_TEXT = 'text'; + private const ACTION_LINK_CONTENT_ICONS = 'icons'; + private const ACTION_LINK_CONTENT_TEXT = 'text'; /** * the total number of rows returned by the SQL query without any appended "LIMIT" clause programmatically