Skip to content

Commit 83ee47e

Browse files
committed
Rename StandardQuoter to CodeQuoter
I'm moving away from names like "Standard", and "Default" for class names since they don't describe what the implementation actially does of what differentiates them from others.
1 parent 387e6ff commit 83ee47e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Handlers/CompositeHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
use DateTimeInterface;
1414
use Respect\Stringifier\Handler;
15-
use Respect\Stringifier\Quoters\StandardQuoter;
15+
use Respect\Stringifier\Quoters\CodeQuoter;
1616

1717
use function array_unshift;
1818

@@ -33,7 +33,7 @@ public function __construct(Handler ...$handlers)
3333

3434
public static function create(): self
3535
{
36-
$quoter = new StandardQuoter(self::MAXIMUM_LENGTH);
36+
$quoter = new CodeQuoter(self::MAXIMUM_LENGTH);
3737

3838
$handler = new self(
3939
new InfiniteNumberHandler($quoter),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use function str_contains;
1919
use function strpos;
2020

21-
final class StandardQuoter implements Quoter
21+
final class CodeQuoter implements Quoter
2222
{
2323
private const string OBJECT_PLACEHOLDER = ' ... }';
2424
private const string ARRAY_PLACEHOLDER = ' ... ]';
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
use PHPUnit\Framework\Attributes\DataProvider;
1515
use PHPUnit\Framework\Attributes\Test;
1616
use PHPUnit\Framework\TestCase;
17-
use Respect\Stringifier\Quoters\StandardQuoter;
17+
use Respect\Stringifier\Quoters\CodeQuoter;
1818

1919
use function strlen;
2020

21-
#[CoversClass(StandardQuoter::class)]
22-
final class StandardQuoterTest extends TestCase
21+
#[CoversClass(CodeQuoter::class)]
22+
final class CodeQuoterTest extends TestCase
2323
{
2424
private const int LIMIT = 20;
2525

2626
#[Test]
2727
public function itShouldNotQuoteWhenDepthIsBiggerThanZero(): void
2828
{
29-
$quoter = new StandardQuoter(self::LIMIT);
29+
$quoter = new CodeQuoter(self::LIMIT);
3030

3131
$expectedValue = 'code';
3232
$actualValue = $quoter->quote('code', 1);
@@ -38,7 +38,7 @@ public function itShouldNotQuoteWhenDepthIsBiggerThanZero(): void
3838
#[DataProvider('provideData')]
3939
public function isShouldQuoteWhenDepthIsBiggerThanZero(string $string, string $expected): void
4040
{
41-
$sut = new StandardQuoter(self::LIMIT);
41+
$sut = new CodeQuoter(self::LIMIT);
4242

4343
$actual = $sut->quote($string, 0);
4444

0 commit comments

Comments
 (0)