Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make internal methods private #368

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/IntercomAdmins.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function getAdmin($id, $options = [])
* @param string $id
* @return string
*/
public function adminPath($id)
private function adminPath($id)
{
return 'admins/' . $id;
}
Expand Down
10 changes: 5 additions & 5 deletions src/IntercomCompanies.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function getCompanyUsers($id, $options = [])
* @param string $id
* @return string
*/
public function companyPath($id)
private function companyPath($id)
{
return 'companies/' . $id;
}
Expand All @@ -123,7 +123,7 @@ public function companyPath($id)
* @param string $id
* @return string
*/
public function companyUsersPath($id)
private function companyUsersPath($id)
{
return 'companies/' . $id . '/users';
}
Expand All @@ -132,17 +132,17 @@ public function companyUsersPath($id)
* @param string $contactId
* @return string
*/
public function companyAttachPath(string $contactId)
private function companyAttachPath(string $contactId)
{
return 'contacts/' . $contactId . '/companies';
}

/**
* @param string $contactId
* @param string $companyId
* @return string
*/
public function companyDetachPath(string $contactId, string $companyId)
private function companyDetachPath(string $contactId, string $companyId)
{
return 'contacts/' . $contactId . '/companies/' . $companyId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/IntercomContacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function nextCursor($pages)
* @param string $id
* @return string
*/
public function contactPath(string $id)
private function contactPath(string $id)
{
return 'contacts/' . $id;
}
Expand Down
4 changes: 2 additions & 2 deletions src/IntercomConversations.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function markConversationAsRead($id)
* @param string $id
* @return string
*/
public function conversationPath($id)
private function conversationPath($id)
{
return 'conversations/' . $id;
}
Expand All @@ -138,7 +138,7 @@ public function conversationPath($id)
* @param string $id
* @return string
*/
public function conversationReplyPath($id)
private function conversationReplyPath($id)
{
return 'conversations/' . $id . '/reply';
}
Expand Down
22 changes: 11 additions & 11 deletions src/IntercomLeads.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@ public function convertLead($options)
return $this->client->post("contacts/convert", $options);
}

/**
* Returns endpoint path to Lead with given ID.
*
* @param string $id
* @return string
*/
public function leadPath($id)
{
return "contacts/" . $id;
}

/**
* Gets a list of Leads through the contacts scroll API.
*
Expand All @@ -112,4 +101,15 @@ public function scrollLeads($options = [])
{
return $this->client->get('contacts/scroll', $options);
}

/**
* Returns endpoint path to Lead with given ID.
*
* @param string $id
* @return string
*/
private function leadPath($id)
{
return "contacts/" . $id;
}
}
2 changes: 1 addition & 1 deletion src/IntercomTeams.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function getTeam($id, $options = [])
* @param string $id
* @return string
*/
public function teamPath($id)
private function teamPath($id)
{
return 'teams/' . $id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/IntercomUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function permanentlyDeleteUser(string $id)
* @param string $id
* @return string
*/
public function userPath(string $id)
private function userPath(string $id)
{
return 'users/' . $id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/IntercomVisitors.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function convertVisitor($options)
* @param string $id
* @return string
*/
public function visitorPath($id)
private function visitorPath($id)
{
return "visitors/" . $id;
}
Expand Down
6 changes: 0 additions & 6 deletions tests/IntercomAdminsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ public function testAdminsGet()
$users = new IntercomAdmins($this->client);
$this->assertSame('foo', $users->getAdmin(1));
}

public function testAdminsGetPath()
{
$users = new IntercomAdmins($this->client);
$this->assertSame('admins/1', $users->adminPath(1));
}
}
12 changes: 0 additions & 12 deletions tests/IntercomCompaniesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public function testCompanyGet()
$this->assertSame('foo', $companies->getCompanies([]));
}

public function testCompanyPath()
{
$users = new IntercomCompanies($this->client);
$this->assertSame('companies/foo', $users->companyPath("foo"));
}

public function testCompanyGetById()
{
$this->client->method('get')->willReturn('foo');
Expand All @@ -51,10 +45,4 @@ public function testCompanyGetUsers()
$companies = new IntercomCompanies($this->client);
$this->assertSame('foo', $companies->getCompanyUsers("foo"));
}

public function testCompanyUsersPath()
{
$users = new IntercomCompanies($this->client);
$this->assertSame('companies/foo/users', $users->companyUsersPath("foo"));
}
}
12 changes: 0 additions & 12 deletions tests/IntercomConversationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ public function testConversationsList()
$this->assertSame('foo', $users->getConversations([]));
}

public function testConversationPath()
{
$users = new IntercomConversations($this->client);
$this->assertSame('conversations/foo', $users->conversationPath("foo"));
}

public function testGetConversation()
{
$this->client->method('get')->willReturn('foo');
Expand Down Expand Up @@ -58,12 +52,6 @@ public function testConversationNextSearch()
$this->assertSame('foo', $conversations->nextSearch([], $pages));
}

public function testConversationReplyPath()
{
$users = new IntercomConversations($this->client);
$this->assertSame('conversations/foo/reply', $users->conversationReplyPath("foo"));
}

public function testReplyToConversation()
{
$this->client->method('post')->willReturn('foo');
Expand Down
7 changes: 0 additions & 7 deletions tests/IntercomLeadsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ public function testLeadsList()
$this->assertSame('foo', $leads->getLeads([]));
}

public function testLeadPath()
{

$leads = new IntercomLeads($this->client);
$this->assertSame("contacts/foo", $leads->leadPath("foo"));
}

public function testLeadsGet()
{
$this->client->method('get')->willReturn('foo');
Expand Down
6 changes: 0 additions & 6 deletions tests/IntercomTeamsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,4 @@ public function testTeamsGet()
$teams = new IntercomTeams($this->client);
$this->assertSame('foo', $teams->getTeam(1));
}

public function testTeamsGetPath()
{
$teams = new IntercomTeams($this->client);
$this->assertSame('teams/1', $teams->teamPath(1));
}
}
6 changes: 0 additions & 6 deletions tests/IntercomVisitorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ public function testVisitorUpdate()
$this->assertSame('foo', $visitors->update([]));
}

public function testVisitorPath()
{
$visitors = new IntercomVisitors($this->client);
$this->assertSame("visitors/foo", $visitors->visitorPath("foo"));
}

public function testVisitorsGet()
{
$this->client->method('get')->willReturn('foo');
Expand Down