Change snipConent entitie property to public

This commit is contained in:
Tim
2025-07-24 15:03:20 +02:00
parent 074c1d8570
commit a1ecaf0189
8 changed files with 40 additions and 136 deletions

View File

@ -26,17 +26,16 @@ class SnipUpdateContentCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
// $io = new SymfonyStyle($input, $output);
$qb = $this->snipContentRepository->createQueryBuilder('s');
$qb->where('s.text IS NOT NULL');
$c = 0;
/** @var SnipContent $snipContent */
foreach ($qb->getQuery()->getResult() as $snipContent) {
$text = $snipContent->getText();
$text = $snipContent->text;
$text = Lexer::reconstruct(Lexer::tokenize($text));
$snipContent->setText($text);
$snipContent->text = $text;
$this->snipContentRepository->save($snipContent);
}