protected function createRepository(ObjectAccess $repository)
    {
        if ($repository->exists('packagist')) {
            return new PackagistRepository(
                $repository->get('packagist'),
                $repository->data()
            );
        }

        $type = $repository->get('type');

        if ('package' === $type) {
            $repository = new PackageRepository(
                $this->objectToArray($repository->get('package')),
                $this->objectToArray($repository->getDefault('options')),
                $repository->data()
            );
        } else {
            $repository = new Repository(
                $type,
                $repository->getDefault('url'),
                $this->objectToArray($repository->getDefault('options')),
                $repository->data()
            );
        }

        return $repository;
    }
protected function createRepository(ObjectAccess $repository)
    {
        if ($repository->exists('packagist')) {
            return new PackagistRepository(
                $repository->get('packagist'),
                $repository->data()
            );
        }

        $type = $repository->get('type');

        if ('package' === $type) {
            $repository = new PackageRepository(
                $this->objectToArray($repository->get('package')),
                $this->objectToArray($repository->getDefault('options')),
                $repository->data()
            );
        } else {
            $repository = new Repository(
                $type,
                $repository->getDefault('url'),
                $this->objectToArray($repository->getDefault('options')),
                $repository->data()
            );
        }

        return $repository;
    }
protected function createRepository ( ObjectAccess $ repository ) { if ( $ repository -> exists ( 'packagist' ) ) { return new PackagistRepository ( $ repository -> get ( 'packagist' ) , $ repository -> data ( ) ) ; } $ type = $ repository -> get ( 'type' ) ; if ( 'package' === $ type ) { $ repository = new PackageRepository ( $ this -> objectToArray ( $ repository -> get ( 'package' ) ) , $ this -> objectToArray ( $ repository -> getDefault ( 'options' ) ) , $ repository -> data ( ) ) ; } else { $ repository = new Repository ( $ type , $ repository -> getDefault ( 'url' ) , $ this -> objectToArray ( $ repository -> getDefault ( 'options' ) ) , $ repository -> data ( ) ) ; } return $ repository ; }
Create a repository from the supplied raw value.

@param ObjectAccess $repository The raw repository data.

@return RepositoryInterface The newly created repository.
Create a repository from the supplied raw value .