Skip to content

Commit

Permalink
Fix debug resource command
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Oct 20, 2023
1 parent ec60035 commit 4121839
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Bundle/Command/DebugResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Sylius\Component\Resource\Metadata\Operations;
use Sylius\Component\Resource\Metadata\RegistryInterface;
use Sylius\Component\Resource\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
use Sylius\Component\Resource\Metadata\Resource\ResourceMetadataCollection;
use Sylius\Component\Resource\Metadata\ResourceMetadata;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Dumper;
Expand Down Expand Up @@ -91,7 +92,7 @@ public function execute(InputInterface $input, OutputInterface $output): ?int
return Command::SUCCESS;
}

$this->debugResource($metadata, $resourceMetadataCollection, $input, $io, $dumper);
$this->debugResource($metadata, $input, $io, $dumper);

return Command::SUCCESS;
}
Expand All @@ -112,7 +113,7 @@ private function listResources(SymfonyStyle $io): void
$io->table(['Alias'], $rows);
}

private function debugResource(MetadataInterface $metadata, ResourceMetadata\ResourceMetadataCollection $resourceMetadataCollection, InputInterface $input, SymfonyStyle $io, Dumper $dumper): void
private function debugResource(MetadataInterface $metadata, InputInterface $input, SymfonyStyle $io, Dumper $dumper): void
{
$io->section('Configuration');

Expand All @@ -133,7 +134,7 @@ private function debugResource(MetadataInterface $metadata, ResourceMetadata\Res
$this->debugResourceCollectionOperation($metadata, $input, $io, $dumper);
}

private function getResourceMetadataCollection(MetadataInterface $resourceConfiguration): ResourceMetadata\ResourceMetadataCollection
private function getResourceMetadataCollection(MetadataInterface $resourceConfiguration): ResourceMetadataCollection
{
return $this->resourceMetadataCollectionFactory->create($resourceConfiguration->getClass('model'));
}
Expand All @@ -153,7 +154,7 @@ private function debugOperation(Operation $operation, SymfonyStyle $io, Dumper $
$io->table(['Option', 'Value'], $rows);
}

private function debugNewResourceMetadata(ResourceMetadata\ResourceMetadataCollection $resourceMetadataCollection, SymfonyStyle $io, Dumper $dumper): void
private function debugNewResourceMetadata(ResourceMetadataCollection $resourceMetadataCollection, SymfonyStyle $io, Dumper $dumper): void
{
$io->section('New Resource Metadata');

Expand Down

0 comments on commit 4121839

Please sign in to comment.