private function saveInstalledPaths()
    {
        // Check if we found installed paths to set.
        if (count($this->installedPaths) !== 0) {
            $paths = implode(',', $this->installedPaths);
            $arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths);
            $configMessage = sprintf(
                'PHP CodeSniffer Config <info>%s</info> <comment>set to</comment> <info>%s</info>',
                self::PHPCS_CONFIG_KEY,
                $paths
            );
        } else {
            // Delete the installed paths if none were found.
            $arguments = array('--config-delete', self::PHPCS_CONFIG_KEY);
            $configMessage = sprintf(
                'PHP CodeSniffer Config <info>%s</info> <comment>delete</comment>',
                self::PHPCS_CONFIG_KEY
            );
        }

        $this->io->write($configMessage);

        $this->processExecutor->execute(
            sprintf(
                'phpcs %s',
                implode(' ', $arguments)
            ),
            $configResult,
            $this->composer->getConfig()->get('bin-dir')
        );

        if ($this->io->isVerbose() && !empty($configResult)) {
            $this->io->write(sprintf('<info>%s</info>', $configResult));
        }
    }
private function saveInstalledPaths()
    {
        // Check if we found installed paths to set.
        if (count($this->installedPaths) !== 0) {
            $paths = implode(',', $this->installedPaths);
            $arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths);
            $configMessage = sprintf(
                'PHP CodeSniffer Config <info>%s</info> <comment>set to</comment> <info>%s</info>',
                self::PHPCS_CONFIG_KEY,
                $paths
            );
        } else {
            // Delete the installed paths if none were found.
            $arguments = array('--config-delete', self::PHPCS_CONFIG_KEY);
            $configMessage = sprintf(
                'PHP CodeSniffer Config <info>%s</info> <comment>delete</comment>',
                self::PHPCS_CONFIG_KEY
            );
        }

        $this->io->write($configMessage);

        $this->processExecutor->execute(
            sprintf(
                'phpcs %s',
                implode(' ', $arguments)
            ),
            $configResult,
            $this->composer->getConfig()->get('bin-dir')
        );

        if ($this->io->isVerbose() && !empty($configResult)) {
            $this->io->write(sprintf('<info>%s</info>', $configResult));
        }
    }
private function saveInstalledPaths ( ) { // Check if we found installed paths to set. if ( count ( $ this -> installedPaths ) !== 0 ) { $ paths = implode ( ',' , $ this -> installedPaths ) ; $ arguments = array ( '--config-set' , self :: PHPCS_CONFIG_KEY , $ paths ) ; $ configMessage = sprintf ( 'PHP CodeSniffer Config <info>%s</info> <comment>set to</comment> <info>%s</info>' , self :: PHPCS_CONFIG_KEY , $ paths ) ; } else { // Delete the installed paths if none were found. $ arguments = array ( '--config-delete' , self :: PHPCS_CONFIG_KEY ) ; $ configMessage = sprintf ( 'PHP CodeSniffer Config <info>%s</info> <comment>delete</comment>' , self :: PHPCS_CONFIG_KEY ) ; } $ this -> io -> write ( $ configMessage ) ; $ this -> processExecutor -> execute ( sprintf ( 'phpcs %s' , implode ( ' ' , $ arguments ) ) , $ configResult , $ this -> composer -> getConfig ( ) -> get ( 'bin-dir' ) ) ; if ( $ this -> io -> isVerbose ( ) && ! empty ( $ configResult ) ) { $ this -> io -> write ( sprintf ( '<info>%s</info>' , $ configResult ) ) ; } }
Save all coding standard paths back into PHP_CodeSniffer

@throws LogicException
@throws ProcessFailedException
@throws RuntimeException
Save all coding standard paths back into PHP_CodeSniffer