Skip to content

Commit 76a2bbb

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Use ::class keyword when possible
2 parents 4e40176 + 8b30c75 commit 76a2bbb

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
@@ -27,7 +27,7 @@ class ReflectionCasterTest extends TestCase
2727

2828
public function testReflectionCaster()
2929
{
30-
$var = new \ReflectionClass('ReflectionClass');
30+
$var = new \ReflectionClass(\ReflectionClass::class);
3131

3232
$this->assertDumpMatchesFormat(
3333
<<<'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)