Skip to content

Commit 52ea899

Browse files
committed
[ci] use reflection in root namespace
1 parent e607f12 commit 52ea899

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Util/TemplateComponentGenerator.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
namespace Symfony\Bundle\MakerBundle\Util;
1313

14-
use ReflectionClass;
15-
use ReflectionException;
16-
1714
/**
1815
* @author Jesse Rushlow <[email protected]>
1916
*
@@ -48,11 +45,11 @@ public function getPropertyType(ClassNameDetails $classNameDetails): ?string
4845
}
4946

5047
/**
51-
* @throws ReflectionException
48+
* @throws \ReflectionException
5249
*/
5350
public function repositoryHasSaveAndRemoveMethods(string $repositoryFullClassName): bool
5451
{
55-
$reflectedComponents = new ReflectionClass($repositoryFullClassName);
52+
$reflectedComponents = new \ReflectionClass($repositoryFullClassName);
5653

5754
return $reflectedComponents->hasMethod('save') && $reflectedComponents->hasMethod('remove');
5855
}

tests/Maker/FunctionalTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use ReflectionClass;
1615
use Symfony\Bundle\FrameworkBundle\Console\Application;
1716
use Symfony\Bundle\MakerBundle\Command\MakerCommand;
1817
use Symfony\Bundle\MakerBundle\Test\MakerTestKernel;
@@ -38,7 +37,7 @@ public function testWiring()
3837

3938
$application = new Application($kernel);
4039
foreach ($finder as $file) {
41-
$maker = new ReflectionClass(sprintf('Symfony\Bundle\MakerBundle\Maker\%s', $file->getBasename('.php')));
40+
$maker = new \ReflectionClass(sprintf('Symfony\Bundle\MakerBundle\Maker\%s', $file->getBasename('.php')));
4241

4342
if ($maker->isAbstract()) {
4443
continue;

0 commit comments

Comments
 (0)