src/ComposerConfigurator.php
public function configure(Composer $composer, IOInterface $io)
    {
        $this->composer = $composer;
        $this->jsonFile = null;
        $this->io = $io;
        
        $publicDirectorySet = $this->isPublicDirectorySet();
        $wordPressInstallDirectorySet = $this->isWordPressInstallDirectorySet();
        $reposConfigured = $this->areReposConfigured();
        $sortingConfigured = $this->isSortingConfigured();
        
        if ($publicDirectorySet && $wordPressInstallDirectorySet && $reposConfigured && $sortingConfigured) {
            return;
        }
        
        if (! $publicDirectorySet) {
            $this->setPublicDirectory();
        }
        
        if (! $wordPressInstallDirectorySet) {
            $this->setWordPressInstallDirectory();
        }
        
        if (! $reposConfigured) {
            $this->configureRepos();
        }
        
        if (! $sortingConfigured) {
            $this->configureSorting();
        }
        
        $this->sortProperties();
        $this->saveJson();
    }
public function configure(Composer $composer, IOInterface $io)
    {
        $this->composer = $composer;
        $this->jsonFile = null;
        $this->io = $io;
        
        $publicDirectorySet = $this->isPublicDirectorySet();
        $wordPressInstallDirectorySet = $this->isWordPressInstallDirectorySet();
        $reposConfigured = $this->areReposConfigured();
        $sortingConfigured = $this->isSortingConfigured();
        
        if ($publicDirectorySet && $wordPressInstallDirectorySet && $reposConfigured && $sortingConfigured) {
            return;
        }
        
        if (! $publicDirectorySet) {
            $this->setPublicDirectory();
        }
        
        if (! $wordPressInstallDirectorySet) {
            $this->setWordPressInstallDirectory();
        }
        
        if (! $reposConfigured) {
            $this->configureRepos();
        }
        
        if (! $sortingConfigured) {
            $this->configureSorting();
        }
        
        $this->sortProperties();
        $this->saveJson();
    }
public function configure ( Composer $ composer , IOInterface $ io ) { $ this -> composer = $ composer ; $ this -> jsonFile = null ; $ this -> io = $ io ; $ publicDirectorySet = $ this -> isPublicDirectorySet ( ) ; $ wordPressInstallDirectorySet = $ this -> isWordPressInstallDirectorySet ( ) ; $ reposConfigured = $ this -> areReposConfigured ( ) ; $ sortingConfigured = $ this -> isSortingConfigured ( ) ; if ( $ publicDirectorySet && $ wordPressInstallDirectorySet && $ reposConfigured && $ sortingConfigured ) { return ; } if ( ! $ publicDirectorySet ) { $ this -> setPublicDirectory ( ) ; } if ( ! $ wordPressInstallDirectorySet ) { $ this -> setWordPressInstallDirectory ( ) ; } if ( ! $ reposConfigured ) { $ this -> configureRepos ( ) ; } if ( ! $ sortingConfigured ) { $ this -> configureSorting ( ) ; } $ this -> sortProperties ( ) ; $ this -> saveJson ( ) ; }
Configure the composer.json file.

@return void
Configure the composer . json file .