getMachine(); return $owner instanceof Machine ? $owner : null; } protected function snapshotEntity(object $entity): array { return [ 'id' => $entity->getId(), 'name' => $this->safeGet($entity, 'getName'), 'reference' => $this->safeGet($entity, 'getReference'), 'prix' => $this->safeGet($entity, 'getPrix'), 'site' => $this->normalizeValue($this->safeGet($entity, 'getSite')), 'constructeurIds' => $this->normalizeCollection($entity->getConstructeurs()), ]; } }