no message
This commit is contained in:
parent
d1697e51aa
commit
5873c129e2
@ -59,17 +59,13 @@ final class Node extends Model
|
||||
return $sMemoFront;
|
||||
}
|
||||
|
||||
public function getDuckClassAttribute()
|
||||
public function getDuckClassAttribute(): string
|
||||
{
|
||||
$sLocation = '';
|
||||
|
||||
if ($this->duck_group) {
|
||||
$sLocation = $this->duck_group;
|
||||
} else {
|
||||
$sLocation = $this->duck_code;
|
||||
}
|
||||
|
||||
return preg_replace('/[^a-zA-Z\x{4e00}-\x{9fa5}]/u', '', $sLocation ?? '');
|
||||
$sLocation = $this->duck_group ?: ($this->duck_code ?? '');
|
||||
|
||||
$sBeforeDash = strstr($sLocation, '-', true) ?: $sLocation;
|
||||
|
||||
return preg_replace('/\d+/', '', $sBeforeDash);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user