@@ -11,10 +11,10 @@ |
||
11 | 11 | use mb24dev\AmoCRM\SessionStorage\FileSessionStorage; |
12 | 12 | use mb24dev\AmoCRM\User\User; |
13 | 13 | |
14 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
14 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
15 | 15 | |
16 | 16 | // store strategy for sessions |
17 | -$fileStorage = new FileSessionStorage(__DIR__ . '/../var/'); |
|
17 | +$fileStorage = new FileSessionStorage(__DIR__.'/../var/'); |
|
18 | 18 | |
19 | 19 | // example guzzle client |
20 | 20 | $client = new Client(); |
@@ -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(), |
@@ -44,7 +44,7 @@ |
||
44 | 44 | ); |
45 | 45 | |
46 | 46 | |
47 | - $request = new Request('POST', $this->getUser()->getAmoCRMDomain() . 'private/api/v2/json/contacts/set', [], $body); |
|
47 | + $request = new Request('POST', $this->getUser()->getAmoCRMDomain().'private/api/v2/json/contacts/set', [], $body); |
|
48 | 48 | |
49 | 49 | return $request; |
50 | 50 | } |
@@ -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 | ]; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | return [ |
125 | 125 | 'id' => $this->id, |
126 | 126 | 'name' => $this->name, |
127 | - 'custom_fields' => array_map(function (CustomField $customField) { |
|
127 | + 'custom_fields' => array_map(function(CustomField $customField) { |
|
128 | 128 | return $customField->toAmoArray(); |
129 | 129 | |
130 | 130 | }, $this->customFields) |
@@ -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); |