[GithubSearchBridge] Fixed indentation

This commit is contained in:
Corentin Garcia 2017-03-23 19:07:55 +01:00
parent 903691b636
commit 88fdaf6984

View File

@ -7,24 +7,24 @@ class GithubSearchBridge extends BridgeAbstract {
const CACHE_TIMEOUT = 600; // 10min const CACHE_TIMEOUT = 600; // 10min
const DESCRIPTION = 'Returns a specified repositories search (sorted by recently updated)'; const DESCRIPTION = 'Returns a specified repositories search (sorted by recently updated)';
const PARAMETERS = array( array( const PARAMETERS = array( array(
's' => array( 's' => array(
'type' => 'text', 'type' => 'text',
'name' => 'Search query' 'name' => 'Search query'
) )
)); ));
public function collectData(){ public function collectData(){
$params = array('utf8' => '✓', $params = array('utf8' => '✓',
'q' => urlencode($this->getInput('s')), 'q' => urlencode($this->getInput('s')),
's' => 'updated', 's' => 'updated',
'o' => 'desc', 'o' => 'desc',
'type' => 'Repositories'); 'type' => 'Repositories');
$url = self::URI . 'search?' . http_build_query($params); $url = self::URI . 'search?' . http_build_query($params);
$html = getSimpleHTMLDOM($url) $html = getSimpleHTMLDOM($url)
or returnServerError('Error while downloading the website content'); or returnServerError('Error while downloading the website content');
foreach($html->find('div.repo-list-item') as $element){ foreach($html->find('div.repo-list-item') as $element){
$item = array(); $item = array();
$uri = $element->find('h3 a', 0)->href; $uri = $element->find('h3 a', 0)->href;