diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php
index c0947e00b..5a0a87d45 100644
--- a/modules/bankwire/bankwire.php
+++ b/modules/bankwire/bankwire.php
@@ -33,9 +33,9 @@ class BankWire extends PaymentModule
private $_html = '';
private $_postErrors = array();
- public $details;
- public $owner;
- public $address;
+ public $details;
+ public $owner;
+ public $address;
public function __construct()
{
@@ -60,15 +60,15 @@ class BankWire extends PaymentModule
$this->displayName = $this->l('Bank Wire');
$this->description = $this->l('Accept payments by bank wire.');
$this->confirmUninstall = $this->l('Are you sure you want to delete your details?');
- if (!isset($this->owner) OR !isset($this->details) OR !isset($this->address))
+ if (!isset($this->owner) || !isset($this->details) || !isset($this->address))
$this->warning = $this->l('Account owner and details must be configured in order to use this module correctly.');
- if (!sizeof(Currency::checkPaymentCurrencies($this->id)))
+ if (!count(Currency::checkPaymentCurrencies($this->id)))
$this->warning = $this->l('No currency set for this module');
}
public function install()
{
- if (!parent::install() OR !$this->registerHook('payment') OR !$this->registerHook('paymentReturn'))
+ if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn'))
return false;
return true;
}
@@ -76,9 +76,9 @@ class BankWire extends PaymentModule
public function uninstall()
{
if (!Configuration::deleteByName('BANK_WIRE_DETAILS')
- OR !Configuration::deleteByName('BANK_WIRE_OWNER')
- OR !Configuration::deleteByName('BANK_WIRE_ADDRESS')
- OR !parent::uninstall())
+ || !Configuration::deleteByName('BANK_WIRE_OWNER')
+ || !Configuration::deleteByName('BANK_WIRE_ADDRESS')
+ || !parent::uninstall())
return false;
return true;
}
@@ -147,11 +147,11 @@ class BankWire extends PaymentModule
if (Tools::isSubmit('btnSubmit'))
{
$this->_postValidation();
- if (!sizeof($this->_postErrors))
+ if (!count($this->_postErrors))
$this->_postProcess();
else
- foreach ($this->_postErrors AS $err)
- $this->_html .= '
'. $err .'
';
+ foreach ($this->_postErrors as $err)
+ $this->_html .= ''.$err.'
';
}
else
$this->_html .= '
';
@@ -172,7 +172,7 @@ class BankWire extends PaymentModule
$cart = Context::getContext()->cart;
if (!$this->active)
- return ;
+ return;
if (!$this->_checkCurrency($cart))
Tools::redirect('index.php?controller=order');
@@ -195,9 +195,9 @@ class BankWire extends PaymentModule
public function hookPayment($params)
{
if (!$this->active)
- return ;
+ return;
if (!$this->checkCurrency($params['cart']))
- return ;
+ return;
$this->smarty->assign(array(
@@ -210,10 +210,10 @@ class BankWire extends PaymentModule
public function hookPaymentReturn($params)
{
if (!$this->active)
- return ;
+ return;
$state = $params['objOrder']->getCurrentState();
- if ($state == Configuration::get('PS_OS_BANKWIRE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK'))
+ if ($state == Configuration::get('PS_OS_BANKWIRE') || $state == Configuration::get('PS_OS_OUTOFSTOCK'))
{
$this->smarty->assign(array(
'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
diff --git a/modules/blockadvertising/blockadvertising.php b/modules/blockadvertising/blockadvertising.php
index b98033a35..f85ac8a5f 100644
--- a/modules/blockadvertising/blockadvertising.php
+++ b/modules/blockadvertising/blockadvertising.php
@@ -92,7 +92,7 @@ class BlockAdvertising extends Module
if (!file_exists(_PS_MODULE_DIR_.$this->name.'/advertising.jpg'))
$this->adv_imgname = '';
else
- Configuration::updateValue('BLOCKADVERT_IMG_EXT','jpg');
+ Configuration::updateValue('BLOCKADVERT_IMG_EXT', 'jpg');
}
if (!empty($this->adv_imgname))
@@ -140,25 +140,24 @@ class BlockAdvertising extends Module
if (Tools::isSubmit('submitAdvConf'))
{
- $file = false;
- if (isset($_FILES['adv_img']) AND isset($_FILES['adv_img']['tmp_name']) AND !empty($_FILES['adv_img']['tmp_name']))
+ if (isset($_FILES['adv_img']) && isset($_FILES['adv_img']['tmp_name']) && !empty($_FILES['adv_img']['tmp_name']))
{
if ($error = ImageManager::validateUpload($_FILES['adv_img'], Tools::convertBytes(ini_get('upload_max_filesize'))))
$errors .= $error;
- elseif ($dot_pos = strrpos($_FILES['adv_img']['name'],'.'))
+ elseif ($dot_pos = strrpos($_FILES['adv_img']['name'], '.'))
{
// as checkImage tell us it's a good image, we'll just copy the extension
$this->_deleteCurrentImg();
$this->adv_imgname = 'advertising';
- $ext = substr($_FILES['adv_img']['name'], $dot_pos+1);
+ $ext = substr($_FILES['adv_img']['name'], $dot_pos + 1);
$newname = 'advertising_custom'.'-'.(int)$this->context->shop->id;
- if (!move_uploaded_file($_FILES['adv_img']['tmp_name'],_PS_MODULE_DIR_.$this->name.'/'.$newname.'.'.$ext))
+ if (!move_uploaded_file($_FILES['adv_img']['tmp_name'], _PS_MODULE_DIR_.$this->name.'/'.$newname.'.'.$ext))
$errors .= $this->l('Error move uploaded file');
else
$this->adv_imgname = $newname;
- Configuration::updateValue('BLOCKADVERT_IMG_EXT',$ext);
+ Configuration::updateValue('BLOCKADVERT_IMG_EXT', $ext);
$this->adv_img = Tools::getMediaServer($this->name)._MODULE_DIR_.$this->name.'/'.$this->adv_imgname.'.'.Configuration::get('BLOCKADVERT_IMG_EXT');
}
}
@@ -185,7 +184,6 @@ class BlockAdvertising extends Module
*/
public function getContent()
{
-
$this->postProcess();
$output = '