fix(psalm): Use end instead of array_last because psalm does not find the polyfill

I’m not sure why psalm cannot see we have a polyfill for array_last.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2026-06-09 14:59:52 +02:00
parent 4c8beed831
commit 71db0ccbe5
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -386,7 +386,7 @@ class TemplateLayout {
$pathParts = explode('/', $path);
if ($pathParts[0] === 'dist') {
// Return the part before the dash in the file name
return explode('-', \array_last($pathParts), 2)[0];
return explode('-', \end($pathParts), 2)[0];
} elseif ($pathParts[0] === 'css') {
// This is a scss request
return $pathParts[1];