snipContentRepository->createQueryBuilder('s'); $qb->where('s.text IS NOT NULL'); /** @var SnipContent $snipContent */ foreach ($qb->getQuery()->getResult() as $snipContent) { $text = $snipContent->text; $text = Lexer::reconstruct(Lexer::tokenize($text)); $snipContent->text = $text; $this->snipContentRepository->save($snipContent); } return Command::SUCCESS; } }