mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 20:27:07 +09:00
Apply PHP Code Styling & Quality Changes (#1617)
This commit is contained in:
1 parent
e07b4a2b08
commit
1970b320e1
5 files changed
+9
-7
No files matched your search
@@ -170,7 +170,7 @@ class Service implements InjectionAwareInterface
|
||||
if (!empty($where)) {
|
||||
$sql .= ' WHERE ' . implode(' AND ', $where);
|
||||
}
|
||||
$sql = $sql . ' ORDER BY c.created_at desc';
|
||||
$sql .= ' ORDER BY c.created_at desc';
|
||||
|
||||
return [$sql, $params];
|
||||
}
|
||||
|
||||
@@ -220,9 +220,10 @@ class Service implements \FOSSBilling\InjectionAwareInterface
|
||||
{
|
||||
// Add the email to the queue
|
||||
$email = $this->_queue($to, $from, $subject, $content, $to_name, $from_name, $client_id, $admin_id);
|
||||
if($send_now){
|
||||
if ($send_now) {
|
||||
$this->_sendFromQueue($email, $throw_exceptions);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -629,9 +630,10 @@ class Service implements \FOSSBilling\InjectionAwareInterface
|
||||
$this->di['db']->trash($queue);
|
||||
}
|
||||
|
||||
if($throw_exceptions){
|
||||
if ($throw_exceptions) {
|
||||
// If the error message is long, truncate it and inform the user the rest is in the error log.
|
||||
$truncated = (strlen($message) > 350) ? __trans('Error message truncated due to length, please check the error log for the complete message: ') . substr($message,0,350).'...' : $message;
|
||||
$truncated = (strlen($message) > 350) ? __trans('Error message truncated due to length, please check the error log for the complete message: ') . substr($message, 0, 350) . '...' : $message;
|
||||
|
||||
throw new \Box_Exception($truncated);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ class Service
|
||||
$sql = $sql . ' WHERE ' . implode(' AND ', $where);
|
||||
}
|
||||
|
||||
$sql = $sql . ' GROUP BY kac.id ORDER BY kac.id DESC';
|
||||
$sql .= ' GROUP BY kac.id ORDER BY kac.id DESC';
|
||||
|
||||
return [$sql, $bindings];
|
||||
}
|
||||
|
||||
@@ -798,7 +798,7 @@ class Service implements InjectionAwareInterface
|
||||
public function stockSale(\Model_Product $product, $qty)
|
||||
{
|
||||
if ($product->stock_control) {
|
||||
$product->quantity_in_stock = $product->quantity_in_stock - $qty;
|
||||
$product->quantity_in_stock -= $qty;
|
||||
$product->updated_at = date('Y-m-d H:i:s');
|
||||
$this->di['db']->store($product);
|
||||
}
|
||||
|
||||
@@ -825,7 +825,7 @@ class Service implements \FOSSBilling\InjectionAwareInterface
|
||||
$query = $query . ' WHERE ' . implode(' AND ', $where);
|
||||
}
|
||||
|
||||
$query = $query . ' ORDER BY id ASC';
|
||||
$query .= ' ORDER BY id ASC';
|
||||
|
||||
return [$query, $bindings];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user