+ public function getName(): string {
+ //With namespace
+ if ($npos = strrpos(static::class, '\\')) {
+ //Set name pos
+ $npos++;
+ //Without namespace
+ } else {
+ $npos = 0;
+ }
+
+ //With trailing command
+ if (substr(static::class, -strlen('Command'), strlen('Command')) === 'Command') {
+ //Set bundle pos
+ $bpos = strlen(static::class) - $npos - strlen('Command');
+ //Without bundle
+ } else {
+ //Set bundle pos
+ $bpos = strlen(static::class) - $npos;
+ }
+
+ //Return command alias
+ return RapsysAirBundle::getAlias().':'.strtolower(substr(static::class, $npos, $bpos));