@@ -143,7 +143,7 @@ |
||
| 143 | 143 | private function auth(UserInterface $user) |
| 144 | 144 | { |
| 145 | 145 | $request = new Request( |
| 146 | - 'POST', $user->getAmoCRMDomain() . "private/api/auth.php?type=json", [], \GuzzleHttp\json_encode( |
|
| 146 | + 'POST', $user->getAmoCRMDomain()."private/api/auth.php?type=json", [], \GuzzleHttp\json_encode( |
|
| 147 | 147 | [ |
| 148 | 148 | 'USER_LOGIN' => $user->getAmoCRMLogin(), |
| 149 | 149 | 'USER_HASH' => $user->getAmoCRMHash(), |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function buildRequest() |
| 19 | 19 | { |
| 20 | 20 | $request = new Request( |
| 21 | - 'GET', $this->user->getAmoCRMDomain() . 'private/api/v2/json/accounts/current' |
|
| 21 | + 'GET', $this->user->getAmoCRMDomain().'private/api/v2/json/accounts/current' |
|
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | 24 | return $request; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | return [ |
| 31 | 31 | 'id' => $this->id, |
| 32 | - 'values' => array_map(function (Value $value) { |
|
| 32 | + 'values' => array_map(function(Value $value) { |
|
| 33 | 33 | return $value->toAmoArray(); |
| 34 | 34 | }, $this->values) |
| 35 | 35 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function save(Session $session, UserInterface $user) |
| 38 | 38 | { |
| 39 | - $filename = $this->sessionPath . $user->getAmoCRMLogin(); |
|
| 39 | + $filename = $this->sessionPath.$user->getAmoCRMLogin(); |
|
| 40 | 40 | if (is_dir($this->sessionPath)) { |
| 41 | 41 | if (file_put_contents($filename, $session->getId())) { |
| 42 | 42 | return; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function getActive(UserInterface $user) |
| 55 | 55 | { |
| 56 | - $filename = $this->sessionPath . $user->getAmoCRMLogin(); |
|
| 56 | + $filename = $this->sessionPath.$user->getAmoCRMLogin(); |
|
| 57 | 57 | if (file_exists($filename)) { |
| 58 | 58 | if ($data = file_get_contents($filename)) { |
| 59 | 59 | return new Session($data); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | ); |
| 53 | 53 | |
| 54 | 54 | $request = new Request( |
| 55 | - 'POST', $this->getUser()->getAmoCRMDomain() . 'private/api/v2/json/contacts/set', [], $body |
|
| 55 | + 'POST', $this->getUser()->getAmoCRMDomain().'private/api/v2/json/contacts/set', [], $body |
|
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | 58 | return $request; |
@@ -194,7 +194,7 @@ |
||
| 194 | 194 | 'linked_leads_id' => $this->linkedLeadsID, |
| 195 | 195 | 'company_name' => $this->companyName, |
| 196 | 196 | 'custom_fields' => array_map( |
| 197 | - function (AmoEntityInterface $customField) { |
|
| 197 | + function(AmoEntityInterface $customField) { |
|
| 198 | 198 | return $customField->toAmoArray(); |
| 199 | 199 | }, |
| 200 | 200 | $this->customFields |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | use mb24dev\AmoCRM\SessionStorage\FileSessionStorage; |
| 9 | 9 | use mb24dev\AmoCRM\User\User; |
| 10 | 10 | |
| 11 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 11 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 12 | 12 | |
| 13 | 13 | // store strategy for sessions |
| 14 | 14 | $fileStorage = new FileSessionStorage('/tmp/amocrm/'); |
@@ -27,4 +27,4 @@ discard block |
||
| 27 | 27 | new Method\CurrentAccount($user, new ArrayResponseTransformer()) |
| 28 | 28 | ); |
| 29 | 29 | |
| 30 | -echo 'Account: ' . print_r($result, true); |
|
| 30 | +echo 'Account: '.print_r($result, true); |
|
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use mb24dev\AmoCRM\SessionStorage\FileSessionStorage; |
| 11 | 11 | use mb24dev\AmoCRM\User\User; |
| 12 | 12 | |
| 13 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 13 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | // store strategy for sessions |
| 16 | 16 | $fileStorage = new FileSessionStorage('/tmp/amocrm/'); |
@@ -49,4 +49,4 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $result = $amoCRMClient->exec($contactSet); |
| 51 | 51 | |
| 52 | -echo 'ContactSet result: ' . print_r($result, true); |
|
| 52 | +echo 'ContactSet result: '.print_r($result, true); |
|