Moved a method
This commit is contained in:
parent
71fb1e1c5b
commit
433e0a3199
|
@ -103,15 +103,6 @@ public function add(array $data): string
|
||||||
return $reference;
|
return $reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getFormatedFilename(string $path): string
|
|
||||||
{
|
|
||||||
$filename = pathinfo($path, PATHINFO_FILENAME);
|
|
||||||
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
|
||||||
$slug = Str::slug($filename);
|
|
||||||
|
|
||||||
return sprintf('%s.%s', $slug, $extension);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a boolean value indicating if the file actually exists on disk
|
* Return a boolean value indicating if the file actually exists on disk
|
||||||
*/
|
*/
|
||||||
|
@ -143,4 +134,16 @@ private function generateNewReference(): string
|
||||||
{
|
{
|
||||||
return Str::random(6);
|
return Str::random(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a suitable filename
|
||||||
|
*/
|
||||||
|
private function getFormatedFilename(string $path): string
|
||||||
|
{
|
||||||
|
$filename = pathinfo($path, PATHINFO_FILENAME);
|
||||||
|
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
||||||
|
$slug = Str::slug($filename);
|
||||||
|
|
||||||
|
return sprintf('%s.%s', $slug, $extension);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user