| @@ -41,10 +41,10 @@ discard block | ||
| 41 | 41 |      { | 
| 42 | 42 | $sfx = $this->randomString(5); | 
| 43 | 43 | $counterparty = $this->counterpartyModel->savePrivatePerson([ | 
| 44 | - 'FirstName' => 'Іван' . $sfx, | |
| 45 | - 'MiddleName' => 'Іванович' . $sfx, | |
| 46 | - 'LastName' => 'Іванов' . $sfx, | |
| 47 | - 'Email' => 'ivan.ivanov.' . substr(uniqid(), 0, 5) . '@nova.poshta.test', | |
| 44 | + 'FirstName' => 'Іван'.$sfx, | |
| 45 | + 'MiddleName' => 'Іванович'.$sfx, | |
| 46 | + 'LastName' => 'Іванов'.$sfx, | |
| 47 | + 'Email' => 'ivan.ivanov.'.substr(uniqid(), 0, 5).'@nova.poshta.test', | |
| 48 | 48 | 'Phone' => rand(380000000000, 380000999999), | 
| 49 | 49 | 'CounterpartyProperty' => 'Recipient', | 
| 50 | 50 | ]); | 
| @@ -54,10 +54,10 @@ discard block | ||
| 54 | 54 | |
| 55 | 55 | //create counterparty | 
| 56 | 56 | $contactPersonData = [ | 
| 57 | - 'FirstName' => 'Петро' . $sfx, | |
| 58 | - 'MiddleName' => 'Петрович' . $sfx, | |
| 59 | - 'LastName' => 'Петров' . $sfx, | |
| 60 | - 'Email' => 'petro.petrov.' . substr(uniqid(), 0, 5) . '@nova.poshta.test', | |
| 57 | + 'FirstName' => 'Петро'.$sfx, | |
| 58 | + 'MiddleName' => 'Петрович'.$sfx, | |
| 59 | + 'LastName' => 'Петров'.$sfx, | |
| 60 | + 'Email' => 'petro.petrov.'.substr(uniqid(), 0, 5).'@nova.poshta.test', | |
| 61 | 61 | 'Phone' => rand(380000000000, 380000999999), | 
| 62 | 62 | ]; | 
| 63 | 63 | $contactPerson = $this->model->save($counterparty['Ref'], $contactPersonData); | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 | |
| 67 | 67 | //update contact person | 
| 68 | 68 | $contactPersonData['Ref'] = $contactPerson['Ref']; | 
| 69 | - $contactPersonData['MiddleName'] = 'Сидорович' . $sfx; | |
| 69 | + $contactPersonData['MiddleName'] = 'Сидорович'.$sfx; | |
| 70 | 70 | $contactPersonUpdated = $this->model->update($counterparty['Ref'], $contactPersonData); | 
| 71 | 71 | $this->assertContactPerson($counterparty, $contactPersonUpdated, ['Ref', 'MiddleName', 'Email']); | 
| 72 | 72 | |
| @@ -112,7 +112,7 @@ discard block | ||
| 112 | 112 | $result = $this->counterpartyModel->getCounterpartyContactPersons($ref, $page++); | 
| 113 | 113 |              foreach ($result as $contactPerson) { | 
| 114 | 114 |                  if ($this->ensureContactPerson($contactPerson, ['Ref' => $ref], ['Ref'])) { | 
| 115 | -                    $this->fail('Assert failed that counterparty `' . $ref . '` has been deleted'); | |
| 115 | +                    $this->fail('Assert failed that counterparty `'.$ref.'` has been deleted'); | |
| 116 | 116 | } | 
| 117 | 117 | } | 
| 118 | 118 | } while (count($result) > 0); | 
| @@ -161,7 +161,7 @@ discard block | ||
| 161 | 161 | $result = $this->counterpartyModel->getCounterpartyContactPersons($counterparty['Ref']); | 
| 162 | 162 |              foreach ($result as $contactPerson) { | 
| 163 | 163 | $this->model->delete($contactPerson['Ref']); | 
| 164 | - $template = 'Contact person %s %s has been deleted' . PHP_EOL; | |
| 164 | + $template = 'Contact person %s %s has been deleted'.PHP_EOL; | |
| 165 | 165 | echo sprintf($template, $contactPerson['FirstName'], $contactPerson['LastName']); | 
| 166 | 166 | } | 
| 167 | 167 | } while (count($result) > 0); | 
| @@ -63,7 +63,7 @@ | ||
| 63 | 63 |              if ($body['success'] === false) { | 
| 64 | 64 | $error = $body['errors'][0] ?? $body['warnings'][0] ?? 'Unknown error'; | 
| 65 | 65 | $errorCode = $body['errorCodes'][0] ?? $body['warningCodes'][0] ?? 0; | 
| 66 | - throw new NovaPoshtaApiException(sprintf(self::ERROR_MSG_TEMPLATE, $error), (int)$errorCode); | |
| 66 | + throw new NovaPoshtaApiException(sprintf(self::ERROR_MSG_TEMPLATE, $error), (int) $errorCode); | |
| 67 | 67 | } | 
| 68 | 68 | return $body['data']; | 
| 69 | 69 |          } catch (GuzzleException $e) { |