22
33namespace Intercom ;
44
5- class IntercomConversations {
5+ class IntercomConversations
6+ {
67
78 /** @var IntercomClient */
89 private $ client ;
@@ -13,7 +14,7 @@ class IntercomConversations {
1314 */
1415 public function __construct ($ client )
1516 {
16- $ this ->client = $ client ;
17+ $ this ->client = $ client ;
1718 }
1819
1920 /**
@@ -25,7 +26,7 @@ public function __construct($client)
2526 */
2627 public function getConversations ($ options )
2728 {
28- return $ this ->client ->get ('conversations ' , $ options );
29+ return $ this ->client ->get ('conversations ' , $ options );
2930 }
3031
3132 /**
@@ -35,9 +36,10 @@ public function getConversations($options)
3536 * @return mixed
3637 * @throws \GuzzleHttp\Exception\GuzzleException
3738 */
38- public function getConversation ($ id ) {
39- $ path = $ this ->conversationPath ($ id );
40- return $ this ->client ->get ($ path , []);
39+ public function getConversation ($ id )
40+ {
41+ $ path = $ this ->conversationPath ($ id );
42+ return $ this ->client ->get ($ path , []);
4143 }
4244
4345 /**
@@ -48,9 +50,10 @@ public function getConversation($id) {
4850 * @return mixed
4951 * @throws \GuzzleHttp\Exception\GuzzleException
5052 */
51- public function replyToConversation ($ id , $ options ) {
52- $ path = $ this ->conversationReplyPath ($ id );
53- return $ this ->client ->post ($ path , $ options );
53+ public function replyToConversation ($ id , $ options )
54+ {
55+ $ path = $ this ->conversationReplyPath ($ id );
56+ return $ this ->client ->post ($ path , $ options );
5457 }
5558
5659 /**
@@ -60,9 +63,10 @@ public function replyToConversation($id, $options) {
6063 * @return mixed
6164 * @throws \GuzzleHttp\Exception\GuzzleException
6265 */
63- public function replyToLastConversation ($ options ) {
64- $ path = 'conversations/last/reply ' ;
65- return $ this ->client ->post ($ path , $ options );
66+ public function replyToLastConversation ($ options )
67+ {
68+ $ path = 'conversations/last/reply ' ;
69+ return $ this ->client ->post ($ path , $ options );
6670 }
6771
6872 /**
@@ -72,10 +76,11 @@ public function replyToLastConversation($options) {
7276 * @return mixed
7377 * @throws \GuzzleHttp\Exception\GuzzleException
7478 */
75- public function markConversationAsRead ($ id ) {
76- $ path = $ this ->conversationPath ($ id );
77- $ data = ['read ' => true ];
78- return $ this ->client ->put ($ path , $ data );
79+ public function markConversationAsRead ($ id )
80+ {
81+ $ path = $ this ->conversationPath ($ id );
82+ $ data = ['read ' => true ];
83+ return $ this ->client ->put ($ path , $ data );
7984 }
8085
8186 /**
@@ -85,7 +90,7 @@ public function markConversationAsRead($id) {
8590 */
8691 public function conversationPath ($ id )
8792 {
88- return 'conversations/ ' . $ id ;
93+ return 'conversations/ ' . $ id ;
8994 }
9095
9196 /**
@@ -95,6 +100,6 @@ public function conversationPath($id)
95100 */
96101 public function conversationReplyPath ($ id )
97102 {
98- return 'conversations/ ' . $ id . '/reply ' ;
103+ return 'conversations/ ' . $ id . '/reply ' ;
99104 }
100105}
0 commit comments