- $current = new Snippet();
-
- //Set default locale
- $current->setLocale($this->locale);
-
- //Set default user
- $current->setUser($user);
-
- //Set default location
- $current->setLocation($this->doctrine->getRepository(Location::class)->findOneById($location['id']));
+ $current = new Snippet($this->locale, $this->doctrine->getRepository(Location::class)->findOneById($location['id']), $user);