+ //Get class
+ $class = strrchr(static::class, '\\', true);
+
+ //Without command name
+ if (substr(static::class, -strlen('\\Command')) !== '\\Command') {
+ $class = strrchr($class, '\\', true);
+ }
+
+ //Set bundle
+ $this->bundle = strtolower($class);
+
+ //With full class name
+ if (class_exists($class .= '\\'.str_replace('\\', '', $class)) && method_exists($class, 'getAlias')) {
+ //Set alias
+ $this->alias = call_user_func([$class, 'getAlias']);
+ }
+