diff --git a/src/ORM/FieldType/DBString.php b/src/ORM/FieldType/DBString.php index 6134e3939..9b974c460 100644 --- a/src/ORM/FieldType/DBString.php +++ b/src/ORM/FieldType/DBString.php @@ -217,7 +217,7 @@ abstract class DBString extends DBField } /** - * Swap add for DefaultEllipsis if need be + * Swap add for defaultEllipsis if need be * @param string $string * @param false|string $add * @return string @@ -225,7 +225,7 @@ abstract class DBString extends DBField private function addEllipsis(string $string, $add): string { if ($add === false) { - $add = $this->DefaultEllipsis(); + $add = $this->defaultEllipsis(); } return $string . $add; @@ -235,7 +235,7 @@ abstract class DBString extends DBField * Get the default string to indicate that a string was cut off. * @return string */ - public function DefaultEllipsis(): string + public function defaultEllipsis(): string { return _t(self::class . '.ELLIPSIS', '…'); } diff --git a/src/ORM/FieldType/DBText.php b/src/ORM/FieldType/DBText.php index 1bc25a151..80fb23d55 100644 --- a/src/ORM/FieldType/DBText.php +++ b/src/ORM/FieldType/DBText.php @@ -128,7 +128,7 @@ class DBText extends DBString // If no $elipsis string is provided, use the default one. if ($add === false) { - $add = $this->DefaultEllipsis(); + $add = $this->defaultEllipsis(); } // Split on sentences (don't remove period) diff --git a/tests/php/ORM/DBTextTest.php b/tests/php/ORM/DBTextTest.php index 021c6e0d2..db58b5e83 100644 --- a/tests/php/ORM/DBTextTest.php +++ b/tests/php/ORM/DBTextTest.php @@ -350,6 +350,6 @@ class DBTextTest extends SapphireTest public function testDefaultEllipsis() { $textObj = new DBText('Test'); - $this->assertEquals('…', $textObj->DefaultEllipsis()); + $this->assertEquals('…', $textObj->defaultEllipsis()); } }