[wip] code smell, psr-12, mvc, other, forgot by 1 year.

This commit is contained in:
2023-01-24 19:04:15 +02:00
parent 775a56c4c8
commit 2bb6bef614
13 changed files with 254 additions and 112 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Battles\Models;
class BankModel extends Model
{
protected static string $tableName = 'bank';
protected static string $primaryKey = 'id';
/**
* @param int $money
* @param int $uid
*/
public function setMoney(int $money, int $uid): void
{
$this->columns = [
self::$primaryKey => $uid,
'money' => $money,
];
$this->updateByPrimaryKey();
}
}