Rename DefaultEllipsis to defaultEllipsis

This commit is contained in:
Maxime Rainville 2020-08-07 09:48:42 +12:00
parent 896c0e4388
commit 26b8b7964e
3 changed files with 5 additions and 5 deletions

View File

@ -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 string $string
* @param false|string $add * @param false|string $add
* @return string * @return string
@ -225,7 +225,7 @@ abstract class DBString extends DBField
private function addEllipsis(string $string, $add): string private function addEllipsis(string $string, $add): string
{ {
if ($add === false) { if ($add === false) {
$add = $this->DefaultEllipsis(); $add = $this->defaultEllipsis();
} }
return $string . $add; return $string . $add;
@ -235,7 +235,7 @@ abstract class DBString extends DBField
* Get the default string to indicate that a string was cut off. * Get the default string to indicate that a string was cut off.
* @return string * @return string
*/ */
public function DefaultEllipsis(): string public function defaultEllipsis(): string
{ {
return _t(self::class . '.ELLIPSIS', '…'); return _t(self::class . '.ELLIPSIS', '…');
} }

View File

@ -128,7 +128,7 @@ class DBText extends DBString
// If no $elipsis string is provided, use the default one. // If no $elipsis string is provided, use the default one.
if ($add === false) { if ($add === false) {
$add = $this->DefaultEllipsis(); $add = $this->defaultEllipsis();
} }
// Split on sentences (don't remove period) // Split on sentences (don't remove period)

View File

@ -350,6 +350,6 @@ class DBTextTest extends SapphireTest
public function testDefaultEllipsis() public function testDefaultEllipsis()
{ {
$textObj = new DBText('Test'); $textObj = new DBText('Test');
$this->assertEquals('…', $textObj->DefaultEllipsis()); $this->assertEquals('…', $textObj->defaultEllipsis());
} }
} }