Skip to content

Commit 3edb156

Browse files
committed
Use ::class keyword when possible
1 parent a41200d commit 3edb156

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Tests/Caster/MemcachedCasterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MemcachedCasterTest extends TestCase
2323

2424
public function testCastMemcachedWithDefaultOptions()
2525
{
26-
if (!class_exists('Memcached')) {
26+
if (!class_exists(\Memcached::class)) {
2727
$this->markTestSkipped('Memcached not available');
2828
}
2929

@@ -53,7 +53,7 @@ public function testCastMemcachedWithDefaultOptions()
5353

5454
public function testCastMemcachedWithCustomOptions()
5555
{
56-
if (!class_exists('Memcached')) {
56+
if (!class_exists(\Memcached::class)) {
5757
$this->markTestSkipped('Memcached not available');
5858
}
5959

Tests/Caster/PdoCasterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public function testCastPdo()
3434

3535
$cast = PdoCaster::castPdo($pdo, [], new Stub(), false);
3636

37-
$this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]);
37+
$this->assertInstanceOf(\Symfony\Component\VarDumper\Caster\EnumStub::class, $cast["\0~\0attributes"]);
3838

3939
$attr = $cast["\0~\0attributes"] = $cast["\0~\0attributes"]->value;
40-
$this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']);
40+
$this->assertInstanceOf(\Symfony\Component\VarDumper\Caster\ConstStub::class, $attr['CASE']);
4141
$this->assertSame('NATURAL', $attr['CASE']->class);
4242
$this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class);
4343

Tests/Caster/ReflectionCasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ReflectionCasterTest extends TestCase
2626

2727
public function testReflectionCaster()
2828
{
29-
$var = new \ReflectionClass('ReflectionClass');
29+
$var = new \ReflectionClass(\ReflectionClass::class);
3030

3131
$this->assertDumpMatchesFormat(
3232
<<<'EOTXT'

Tests/Fixtures/dumb-var.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Symfony\Component\VarDumper\Tests\Fixture;
44

5-
if (!class_exists('Symfony\Component\VarDumper\Tests\Fixture\DumbFoo')) {
5+
if (!class_exists(\Symfony\Component\VarDumper\Tests\Fixture\DumbFoo::class)) {
66
class DumbFoo
77
{
88
public $foo = 'foo';

0 commit comments

Comments
 (0)