refactor(di): replace end() with array_last()

This commit is contained in:
2025-11-03 18:46:06 +01:00
parent 12e793b95f
commit da1dee7a01

View File

@@ -64,8 +64,8 @@ final class CyclicDependencyException extends ContainerException
private function buildMessage(): string
{
$cycleStr = implode(' → ', $this->cycle);
$fullChain = $this->fullChain;
$requestedClass = end($fullChain);
$requestedClass = array_last($this->fullChain);
// Prüfe ob Initializer-Zyklus vorliegt
$initializerInfo = $this->detectInitializerCycle();