From: Raphaƫl Gertz Date: Sun, 8 Dec 2024 04:51:16 +0000 (+0100) Subject: Remove unused getBundleAlias function X-Git-Tag: 0.5.4~17 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/d8a52aa745826b3dfa93f3e800a63ea57453d6e5 Remove unused getBundleAlias function --- 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 *