Skip to content

Commit 71db0cc

Browse files
committed
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>
1 parent 4c8beed commit 71db0cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/TemplateLayout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public function getAppNamefromPath(string $path): string|false {
386386
$pathParts = explode('/', $path);
387387
if ($pathParts[0] === 'dist') {
388388
// Return the part before the dash in the file name
389-
return explode('-', \array_last($pathParts), 2)[0];
389+
return explode('-', \end($pathParts), 2)[0];
390390
} elseif ($pathParts[0] === 'css') {
391391
// This is a scss request
392392
return $pathParts[1];

0 commit comments

Comments
 (0)