Correct AbstractEntityCommand and correct small mistakes
This commit is contained in:
parent
941e3cdc9c
commit
1888923d28
@ -10,6 +10,7 @@
|
||||
},
|
||||
"require": {
|
||||
"symfony/http-kernel": "^6.1",
|
||||
"symfony/console": "^6.1"
|
||||
"symfony/console": "^6.1",
|
||||
"symfony/orm-pack": "^2.2"
|
||||
}
|
||||
}
|
||||
|
2793
composer.lock
generated
2793
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Ardent\UtilBundle\Command;
|
||||
namespace Ardent\UtilBundle\EntityBuilder;
|
||||
|
||||
use App\Entity\Configuration;
|
||||
use Ardent\UtilBundle\EntityBuilder\Builder;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Exception;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
@ -68,7 +65,7 @@ abstract class AbstractEntityCommand extends Command
|
||||
$entity = $this->select($io, $id);
|
||||
$table = $io->createTable();
|
||||
$table->setHeaders(['property', 'value']);
|
||||
$table->setRows($builder->getAllproperties($entity));
|
||||
$table->setRows($builder->getAllProperties($entity));
|
||||
$table->setHeaderTitle(sprintf('id: %s', $entity->getId()));
|
||||
$table->render();
|
||||
} else {
|
@ -13,7 +13,6 @@ class Builder
|
||||
*/
|
||||
private array $elements = [];
|
||||
|
||||
|
||||
public function __construct(
|
||||
private readonly SymfonyStyle $io,
|
||||
)
|
||||
@ -59,7 +58,7 @@ class Builder
|
||||
$this->setProperty($object, $element);
|
||||
}
|
||||
|
||||
public function getAllproperties(object $object): array
|
||||
public function getAllProperties(object $object): array
|
||||
{
|
||||
$data = [];
|
||||
foreach ($this->elements as $element) {
|
||||
|
Loading…
Reference in New Issue
Block a user