public function getAvailableCommands(): array
    {
        if ($this->availableCommands === null) {
            $this->availableCommands = [];

            foreach (static::getCommandControllerMethodArguments($this->objectManager) as $className => $methods) {
                foreach (array_keys($methods) as $methodName) {
                    $this->availableCommands[] = new Command($className, substr($methodName, 0, -7));
                }
            }
        }

        return $this->availableCommands;
    }
public function getAvailableCommands(): array
    {
        if ($this->availableCommands === null) {
            $this->availableCommands = [];

            foreach (static::getCommandControllerMethodArguments($this->objectManager) as $className => $methods) {
                foreach (array_keys($methods) as $methodName) {
                    $this->availableCommands[] = new Command($className, substr($methodName, 0, -7));
                }
            }
        }

        return $this->availableCommands;
    }
public function getAvailableCommands ( ) : array { if ( $ this -> availableCommands === null ) { $ this -> availableCommands = [ ] ; foreach ( static :: getCommandControllerMethodArguments ( $ this -> objectManager ) as $ className => $ methods ) { foreach ( array_keys ( $ methods ) as $ methodName ) { $ this -> availableCommands [ ] = new Command ( $ className , substr ( $ methodName , 0 , - 7 ) ) ; } } } return $ this -> availableCommands ; }
Returns an array of all commands

@return array<Command>
@api
Returns an array of all commands