mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 17:54:55 +02:00
phpstan: level 1 passed
This commit is contained in:
@@ -4,6 +4,10 @@ namespace MyAAC\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property integer $lastday
|
||||
* @property integer $premdays
|
||||
*/
|
||||
class Account extends Model {
|
||||
|
||||
protected $table = 'accounts';
|
||||
@@ -46,8 +50,8 @@ class Account extends Model {
|
||||
return 65535;
|
||||
}
|
||||
|
||||
$ret = ceil($this->premdays - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->lastday))) - date("z", $this->lastday)));
|
||||
return $ret > 0 ? $ret : 0;
|
||||
$ret = ceil($this->premdays - ((int)date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->lastday))) - date("z", $this->lastday)));
|
||||
return max($ret, 0);
|
||||
}
|
||||
|
||||
public function getIsPremiumAttribute()
|
||||
|
@@ -2,7 +2,14 @@
|
||||
|
||||
namespace MyAAC\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* @property int $level
|
||||
* @property int $vocation
|
||||
* @property int $online
|
||||
* @property hasOne $onlineTable
|
||||
*/
|
||||
class Player extends Model {
|
||||
|
||||
protected $table = 'players';
|
||||
|
Reference in New Issue
Block a user