protected function getConfigFilesByComposer(): array
    {
        $this->getLogger()->write('<info>Searching for ".apishka" files</info>');

        if ($this->getEvent() === null)
            throw new \LogicException('Event not exists');

        $configs = array();
        if ($this->isDependantPackage($this->getEvent()->getComposer()->getPackage()))
        {
            $path = $this->getConfigPackagePath(
                rtrim($this->getRootPackagePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
                $this->getEvent()->getComposer()->getPackage()
            );

            if ($path)
                $configs[$this->getEvent()->getComposer()->getPackage()->getName()] = $path;
        }

        $packages = $this->getEvent()->getComposer()->getRepositoryManager()->getLocalRepository()->getPackages();
        foreach ($packages as $package)
        {
            if ($this->isDependantPackage($package, false))
            {
                $path = $this->getConfigPackagePath(
                    $this->getEvent()->getComposer()->getInstallationManager()->getInstallPath($package),
                    $package
                );

                if ($path)
                    $configs[$package->getName()] = $path;
            }
        }

        ksort($configs);

        Cacher::getInstance()->set(
            $this->getConfigsCacheName(),
            $configs
        );

        return $configs;
    }
protected function getConfigFilesByComposer(): array
    {
        $this->getLogger()->write('<info>Searching for ".apishka" files</info>');

        if ($this->getEvent() === null)
            throw new \LogicException('Event not exists');

        $configs = array();
        if ($this->isDependantPackage($this->getEvent()->getComposer()->getPackage()))
        {
            $path = $this->getConfigPackagePath(
                rtrim($this->getRootPackagePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR,
                $this->getEvent()->getComposer()->getPackage()
            );

            if ($path)
                $configs[$this->getEvent()->getComposer()->getPackage()->getName()] = $path;
        }

        $packages = $this->getEvent()->getComposer()->getRepositoryManager()->getLocalRepository()->getPackages();
        foreach ($packages as $package)
        {
            if ($this->isDependantPackage($package, false))
            {
                $path = $this->getConfigPackagePath(
                    $this->getEvent()->getComposer()->getInstallationManager()->getInstallPath($package),
                    $package
                );

                if ($path)
                    $configs[$package->getName()] = $path;
            }
        }

        ksort($configs);

        Cacher::getInstance()->set(
            $this->getConfigsCacheName(),
            $configs
        );

        return $configs;
    }
protected function getConfigFilesByComposer ( ) : array { $ this -> getLogger ( ) -> write ( '<info>Searching for ".apishka" files</info>' ) ; if ( $ this -> getEvent ( ) === null ) throw new \ LogicException ( 'Event not exists' ) ; $ configs = array ( ) ; if ( $ this -> isDependantPackage ( $ this -> getEvent ( ) -> getComposer ( ) -> getPackage ( ) ) ) { $ path = $ this -> getConfigPackagePath ( rtrim ( $ this -> getRootPackagePath ( ) , DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR , $ this -> getEvent ( ) -> getComposer ( ) -> getPackage ( ) ) ; if ( $ path ) $ configs [ $ this -> getEvent ( ) -> getComposer ( ) -> getPackage ( ) -> getName ( ) ] = $ path ; } $ packages = $ this -> getEvent ( ) -> getComposer ( ) -> getRepositoryManager ( ) -> getLocalRepository ( ) -> getPackages ( ) ; foreach ( $ packages as $ package ) { if ( $ this -> isDependantPackage ( $ package , false ) ) { $ path = $ this -> getConfigPackagePath ( $ this -> getEvent ( ) -> getComposer ( ) -> getInstallationManager ( ) -> getInstallPath ( $ package ) , $ package ) ; if ( $ path ) $ configs [ $ package -> getName ( ) ] = $ path ; } } ksort ( $ configs ) ; Cacher :: getInstance ( ) -> set ( $ this -> getConfigsCacheName ( ) , $ configs ) ; return $ configs ; }
Get config files by composer

@return array
Get config files by composer