protected function getInstalledPackages()
    {
        if ($this->installedPackages === null) {
            $installedPackages = [];
            $packageService = $this->application->make(PackageService::class);
            foreach ($packageService->getInstalledHandles() as $packageHandle) {
                $installedPackages[$packageHandle] = $packageService->getClass($packageHandle);
            }
            $this->installedPackages = $installedPackages;
        }

        return $this->installedPackages;
    }