mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -4,6 +4,9 @@
|
||||
|
||||
trait Enum
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function all(): array
|
||||
{
|
||||
$reflection = new \ReflectionClass(self::class);
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
trait HasProjectThroughServer
|
||||
{
|
||||
/**
|
||||
* @return HasOneThrough<Project, Server, $this>
|
||||
*/
|
||||
public function project(): HasOneThrough
|
||||
{
|
||||
return $this->hasOneThrough(
|
||||
|
@ -21,7 +21,7 @@ public function getUpdatedAtByTimezoneAttribute(): string
|
||||
return $this->getDateTimeByTimezone($this->updated_at);
|
||||
}
|
||||
|
||||
public function getDateTimeByTimezone(?Carbon $value = null): ?string
|
||||
public function getDateTimeByTimezone(?Carbon $value = null): string
|
||||
{
|
||||
if ($value && auth()->user() && auth()->user()->timezone) {
|
||||
try {
|
||||
@ -30,6 +30,6 @@ public function getDateTimeByTimezone(?Carbon $value = null): ?string
|
||||
}
|
||||
}
|
||||
|
||||
return $value;
|
||||
return $value ?? '';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user