/**
* Get the downloadable file name for this upload.
- *
- * @return mixed|string
*/
- public function getFileName()
+ public function getFileName(): string
{
- if (strpos($this->name, '.') !== false) {
+ if (str_contains($this->name, '.')) {
return $this->name;
}
*/
public function getUrl($openInline = false): string
{
- if ($this->external && strpos($this->path, 'http') !== 0) {
+ if ($this->external && !str_starts_with($this->path, 'http')) {
return $this->path;
}