Coding style fix

Fixed the bridge to follow the project coding style
This commit is contained in:
sysadminstory 2017-10-17 23:30:27 +02:00
parent 3c61dc2b57
commit 5cbd363597
1 changed files with 5 additions and 9 deletions

View File

@ -2,9 +2,8 @@
class DealabsBridge extends BridgeAbstract { class DealabsBridge extends BridgeAbstract {
const NAME = 'Dealabs search bridge'; const NAME = 'Dealabs search bridge';
const URI = 'https://www.dealabs.com/'; const URI = 'https://www.dealabs.com/';
const DESCRIPTION = 'Return the Dealabs search result using keywords,' const DESCRIPTION = 'Return the Dealabs search result using keywords,
. ' with/without expired deals, with/without shop deals and by' with/without expired deals, with/without shop deals and by category';
. ' category';
const MAINTAINER = 'sysadminstory'; const MAINTAINER = 'sysadminstory';
const PARAMETERS = array( array ( const PARAMETERS = array( array (
'q' => array( 'q' => array(
@ -157,15 +156,12 @@ class DealabsBridge extends BridgeAbstract {
if(strlen($str) >= 2) { if(strlen($str) >= 2) {
if(substr($str, 0, 1) == 'c') { if(substr($str, 0, 1) == 'c') {
$var_name = 'cat[]'; $var_name = 'cat[]';
} } else if(substr($str, 0, 1) == 's') {
else if(substr($str, 0, 1) == 's') {
$var_name = 'sub_cat[]'; $var_name = 'sub_cat[]';
} }
$value = substr($str, 1); $value = substr($str, 1);
return $var_name .'='. $value; return $var_name .'='. $value;
} } else {
else
{
return ''; return '';
} }
} }