|
12 | 12 | use Doctrine\Persistence\ObjectManager;
|
13 | 13 | use PHPUnit\Framework\TestCase;
|
14 | 14 | use Symfony\Component\DependencyInjection\Container;
|
| 15 | +use function interface_exists; |
| 16 | +use function class_alias; |
15 | 17 |
|
16 | 18 | /**
|
17 | 19 | * @covers \Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader::getFixturesDependencyTree
|
18 | 20 | * @covers \Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader::resolveFixturesDependencyTree
|
19 | 21 | */
|
20 | 22 | class ResolveFixturesSubtreeTest extends TestCase
|
21 | 23 | {
|
| 24 | + /** |
| 25 | + * @var SymfonyFixturesLoader |
| 26 | + */ |
22 | 27 | private $loader;
|
23 | 28 |
|
24 |
| - public static function setUpBeforeClass() |
| 29 | + public static function setUpBeforeClass() : void |
25 | 30 | {
|
26 |
| - if (!interface_exists(ObjectManager::class)) { |
| 31 | + if (! interface_exists(ObjectManager::class)) { |
27 | 32 | class_alias('Doctrine\Common\Persistence\ObjectManager', 'Doctrine\Persistence\ObjectManager', false);
|
28 | 33 | }
|
29 | 34 | }
|
30 | 35 |
|
31 |
| - protected function setUp() |
| 36 | + protected function setUp() : void |
32 | 37 | {
|
33 | 38 | $this->loader = new SymfonyFixturesLoader(new Container());
|
34 | 39 | }
|
@@ -95,18 +100,21 @@ public function testResolveRecursively() : void
|
95 | 100 | private function createFixture(array $dependencies) : FixtureInterface
|
96 | 101 | {
|
97 | 102 | return new class ($dependencies) implements FixtureInterface, DependentFixtureInterface {
|
| 103 | + /** |
| 104 | + * @var string[] |
| 105 | + */ |
98 | 106 | private $dependencies;
|
99 | 107 |
|
100 | 108 | public function __construct(array $dependencies)
|
101 | 109 | {
|
102 | 110 | $this->dependencies = $dependencies;
|
103 | 111 | }
|
104 | 112 |
|
105 |
| - public function load(ObjectManager $manager) |
| 113 | + public function load(ObjectManager $manager) : void |
106 | 114 | {
|
107 | 115 | }
|
108 | 116 |
|
109 |
| - public function getDependencies() |
| 117 | + public function getDependencies() : array |
110 | 118 | {
|
111 | 119 | return $this->dependencies;
|
112 | 120 | }
|
|
0 commit comments