From d8a52aa745826b3dfa93f3e800a63ea57453d6e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 8 Dec 2024 05:51:16 +0100 Subject: [PATCH 1/1] Remove unused getBundleAlias function --- RapsysPackBundle.php | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/RapsysPackBundle.php b/RapsysPackBundle.php index 285c7bb..c9a6d48 100644 --- a/RapsysPackBundle.php +++ b/RapsysPackBundle.php @@ -28,45 +28,6 @@ class RapsysPackBundle extends Bundle { return $this->createContainerExtension(); } - /** - * Return bundle alias - * - * @return string The bundle alias - */ - public static function getBundleAlias(): string { - //With namespace - if ($npos = strrpos(static::class, '\\')) { - //Set name pos - $npos++; - - //With single namespace - $nspos = strpos(static::class, '\\'); - //Without namespace - } else { - //Set name pos - $npos = 0; - } - - //With trailing bundle - if (substr(static::class, -strlen('Bundle'), strlen('Bundle')) === 'Bundle') { - //Set bundle pos - $bpos = strlen(static::class) - $npos - strlen('Bundle'); - //Without bundle - } else { - //Set bundle pos - $bpos = strlen(static::class) - $npos; - } - - //With namespace - if ($npos) { - //Return prefixed class name - return strtolower(substr(static::class, 0, $nspos).'/'.substr(static::class, $npos, $bpos)); - } - - //Return class name - return strtolower(substr(static::class, $npos, $bpos)); - } - /** * Return alias * -- 2.41.1