diff --git a/libraries/classes/Tracking/Tracker.php b/libraries/classes/Tracking/Tracker.php
index 1867e056ad..02bc65859f 100644
--- a/libraries/classes/Tracking/Tracker.php
+++ b/libraries/classes/Tracking/Tracker.php
@@ -38,7 +38,6 @@ use function preg_replace;
use function rtrim;
use function serialize;
use function sprintf;
-use function str_replace;
use function strtotime;
use function substr;
use function trim;
@@ -90,30 +89,6 @@ class Tracker
return $relationParameters->trackingFeature !== null;
}
- /**
- * Parses the name of a table from a SQL statement substring.
- *
- * @param string $string part of SQL statement
- *
- * @return string the name of table
- */
- protected static function getTableName(string $string): string
- {
- if (mb_strstr($string, '.')) {
- $temp = explode('.', $string);
- $tableName = $temp[1];
- } else {
- $tableName = $string;
- }
-
- $str = explode("\n", $tableName);
- $tableName = $str[0];
-
- $tableName = str_replace([';', '`'], '', $tableName);
-
- return trim($tableName);
- }
-
/**
* Gets the tracking status of a table, is it active or disabled ?
*
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index ac07d50c4d..474969dbc1 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -13652,9 +13652,6 @@
value]]>
value]]>
-
- getTableName
-
@@ -15536,7 +15533,6 @@
mixed[]
mixed[]
- mixed[]
$data[0]
diff --git a/test/classes/Tracking/TrackerTest.php b/test/classes/Tracking/TrackerTest.php
index bf58103e05..8b9b63fe66 100644
--- a/test/classes/Tracking/TrackerTest.php
+++ b/test/classes/Tracking/TrackerTest.php
@@ -111,32 +111,6 @@ class TrackerTest extends AbstractTestCase
);
}
- /**
- * Test for Tracker::getTableName()
- *
- * @param string $string String to test against
- * @param string $expected Expected Table Name
- *
- * @dataProvider getTableNameData
- */
- public function testGetTableName(string $string, string $expected): void
- {
- $this->assertEquals(
- $expected,
- $this->callFunction(null, Tracker::class, 'getTableName', [$string]),
- );
- }
-
- /**
- * Data Provider for testGetTableName
- *
- * @return mixed[] Test data
- */
- public static function getTableNameData(): array
- {
- return [['`tbl`;', 'tbl'], [' `pma.table` ', 'table'], [" `pma.table\nfoobar` ", 'table']];
- }
-
/**
* Test for Tracker::isTracked()
*/