/** * {@inheritDoc} */ public function load(ObjectManager $manager) { for ($i = 0; $i < 10; $i++) { $company = new Company(); $company->setName($this->fakerGenerator->company . ' ' . $this->fakerGenerator->companySuffix); $company->setShortName($this->fakerGenerator->company); $company->setCountry($this->fakerGenerator->countryCode); $company->setStreet($this->fakerGenerator->streetName); $company->setStreetNo($this->fakerGenerator->streetSuffix); $company->setFlatNo($this->fakerGenerator->randomNumber()); $company->setPostCode($this->fakerGenerator->postcode); $company->setCity($this->fakerGenerator->city); $manager->persist($company); } $manager->flush(); }