mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:50:17 +00:00
Rewrites:
- converted single-line if() block to multi-line and with curly braces - "imported" SPL classes to have unified code style - always initialize your variables ... :-/ - added some empty lines/spaces for better readability Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
3b646644c0
commit
9fa812b35d
8 changed files with 33 additions and 15 deletions
|
@ -7,6 +7,7 @@
|
|||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\Database\DBA;
|
||||
use \BadMethodCallException;
|
||||
|
||||
class ItemDeliveryData
|
||||
{
|
||||
|
@ -71,7 +72,7 @@ class ItemDeliveryData
|
|||
public static function insert($item_id, array $fields)
|
||||
{
|
||||
if (empty($item_id)) {
|
||||
throw new \BadMethodCallException('Empty item_id');
|
||||
throw new BadMethodCallException('Empty item_id');
|
||||
}
|
||||
|
||||
$fields['iid'] = $item_id;
|
||||
|
@ -92,7 +93,7 @@ class ItemDeliveryData
|
|||
public static function update($item_id, array $fields)
|
||||
{
|
||||
if (empty($item_id)) {
|
||||
throw new \BadMethodCallException('Empty item_id');
|
||||
throw new BadMethodCallException('Empty item_id');
|
||||
}
|
||||
|
||||
if (empty($fields)) {
|
||||
|
@ -113,7 +114,7 @@ class ItemDeliveryData
|
|||
public static function delete($item_id)
|
||||
{
|
||||
if (empty($item_id)) {
|
||||
throw new \BadMethodCallException('Empty item_id');
|
||||
throw new BadMethodCallException('Empty item_id');
|
||||
}
|
||||
|
||||
return DBA::delete('item-delivery-data', ['iid' => $item_id]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue