Skip to content

Commit 3c1a8a2

Browse files
committed
Updated fixtures
1 parent 7089eaa commit 3c1a8a2

5 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/DataFixtures/ReportFixtures.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
use Doctrine\Bundle\FixturesBundle\Fixture;
77
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
88
use Doctrine\Persistence\ObjectManager;
9-
use Symfony\Component\HttpKernel\KernelInterface;
109

1110
class ReportFixtures extends Fixture implements FixtureGroupInterface
1211
{
13-
public function __construct(protected ReportImporter $reportImporter, protected KernelInterface $kernel)
12+
public function __construct(protected ReportImporter $reportImporter)
1413
{
1514
}
1615

src/DataFixtures/SystemFixtures.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
use Doctrine\Bundle\FixturesBundle\Fixture;
77
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
88
use Doctrine\Persistence\ObjectManager;
9-
use Symfony\Component\HttpKernel\KernelInterface;
109

1110
class SystemFixtures extends Fixture implements FixtureGroupInterface
1211
{
13-
public function __construct(protected SystemImporter $systemImporter, protected KernelInterface $kernel)
12+
public function __construct(protected SystemImporter $systemImporter)
1413
{
1514
}
1615

1716
public function load(ObjectManager $manager): void
1817
{
19-
$rootPath = $this->kernel->getProjectDir();
20-
$this->systemImporter->import($rootPath.'/example_data/systems.json');
18+
$this->systemImporter->import(__DIR__.'/example_data/systems.json');
2119
}
2220

2321
public static function getGroups(): array
File renamed without changes.
File renamed without changes.

src/Service/ReportImporter.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
class ReportImporter extends BaseImporter
99
{
10-
/**
11-
* @throws \Exception
12-
*/
13-
public function import(string $src, ?ProgressBar $progressBar = null): void
10+
public function import(string $src, ?ProgressBar $progressBar = null): void
1411
{
1512
$json = file_get_contents($src);
1613
$entries = json_decode($json);

0 commit comments

Comments
 (0)