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 committed by backportbot[bot]
parent 87c7fa0a97
commit 39f4f0f468

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];