createCompanyProcessor = $createCompanyProcessor; $this->updatesCompanyStatus = $updatesCompanyStatus; $this->createCompanyModuleProcessor = $createCompanyModuleProcessor; $this->createContactProcessor = $createContactProcessor; $this->createsCompanyConnection = $createsCompanyConnection; $this->approvesCompanyConnection = $approvesCompanyConnection; $this->createAddressFromOldAddressProcessor = $createAddressFromOldAddressProcessor; $this->createsAddress = $createsAddress; $this->fetchesCompany = $fetchesCompany; $this->createsContact = $createsContact; } /** * Run the database seeds. * * @return void * @throws \App\Classes\Exceptions\AccessForbiddenException * @throws \App\Classes\Exceptions\MalformedRequestException * @throws \App\Classes\Exceptions\RequestValidationException */ public function run() { /** @var Company $company */ $company = $this->fetchesCompany->execute(['reference' => 'MODERN']); /** @var CompanyModule $companyModule */ $companyModule = $this->createCompanyModuleProcessor->execute($company, BusinessType::WAREHOUSE); $companyModule->update(['name' => 'Guangzhou', 'reference' => 'GZ-V02']); $address = new AddressObject('广东省 广州市 白云区 江高镇松岗街七横63号', '', 2, 35, 633, 510450, AddressType::BILLING, ApprovalStatus::APPROVED); $contact = new ContactObject('郑先生', '13719211997', '', ''); $this->createsAddress->execute($companyModule, $address); $this->createsContact->execute($companyModule, $contact); $this->createsContact->execute($companyModule, $contact); } }