Skip to content
Merged
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
8 changes: 4 additions & 4 deletions lib/Github/Api/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Search extends AbstractApi
*/
public function repositories($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/repositories', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/repositories', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -46,7 +46,7 @@ public function repositories($q, $sort = 'updated', $order = 'desc')
*/
public function issues($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/issues', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/issues', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -62,7 +62,7 @@ public function issues($q, $sort = 'updated', $order = 'desc')
*/
public function code($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/code', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/code', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -78,6 +78,6 @@ public function code($q, $sort = 'updated', $order = 'desc')
*/
public function users($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/users', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/users', array('q' => $q, 'sort' => $sort, 'order' => $order));
}
}
16 changes: 8 additions & 8 deletions test/Github/Tests/Api/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function shouldSearchRepositoriesByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/repositories',
'search/repositories',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -36,7 +36,7 @@ public function shouldSearchRepositoriesRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/repositories',
'search/repositories',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -59,7 +59,7 @@ public function shouldSearchIssuesByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/issues',
'search/issues',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -79,7 +79,7 @@ public function shouldSearchIssuesRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/issues',
'search/issues',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -102,7 +102,7 @@ public function shouldSearchCodeByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/code',
'search/code',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -122,7 +122,7 @@ public function shouldSearchCodeRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/code',
'search/code',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -145,7 +145,7 @@ public function shouldSearchUsersByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/users',
'search/users',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -165,7 +165,7 @@ public function shouldSearchUsersRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/users',
'search/users',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand Down