Code smell.
This commit is contained in:
@@ -9,16 +9,16 @@ class Item
|
||||
public static function add(array $params): void
|
||||
{
|
||||
$query = 'insert into items (
|
||||
name, item_type, durability,
|
||||
need_strength, need_dexterity, need_intuition, need_endurance, need_intelligence, need_wisdom,
|
||||
add_strength, add_dexterity, add_intuition, add_endurance, add_intelligence, add_wisdom,
|
||||
add_accuracy, add_evasion, add_criticals, add_min_physical_damage, add_max_physical_damage,
|
||||
image, weight)
|
||||
name, item_type, durability,
|
||||
need_strength, need_dexterity, need_intuition, need_endurance, need_intelligence, need_wisdom,
|
||||
add_strength, add_dexterity, add_intuition, add_endurance, add_intelligence, add_wisdom,
|
||||
add_accuracy, add_evasion, add_criticals, add_min_physical_damage, add_max_physical_damage,
|
||||
image, weight)
|
||||
values (
|
||||
:name, :item_type, :durability,
|
||||
:need_strength, :need_dexterity, :need_intuition, :need_endurance, :need_intelligence, :need_wisdom,
|
||||
:add_strength, :add_dexterity, :add_intuition, :add_endurance, :add_intelligence, :add_wisdom,
|
||||
:add_accuracy, :add_evasion, :add_criticals, :add_min_physical_damage, :add_max_physical_damage,
|
||||
:name, :item_type, :durability,
|
||||
:need_strength, :need_dexterity, :need_intuition, :need_endurance, :need_intelligence, :need_wisdom,
|
||||
:add_strength, :add_dexterity, :add_intuition, :add_endurance, :add_intelligence, :add_wisdom,
|
||||
:add_accuracy, :add_evasion, :add_criticals, :add_min_physical_damage, :add_max_physical_damage,
|
||||
:image, :weight)';
|
||||
$values = [
|
||||
'name' => $params['name'] ?? uniqid(),
|
||||
@@ -46,4 +46,4 @@ class Item
|
||||
];
|
||||
Db::getInstance()->execute($query, $values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user