public static function configure(): void
    {
        $filesystem = new Filesystem();
        $config     = [
            'colors'          => '1',
            'installed_paths' => implode(',', [
                Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/',
                Path::VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard',
            ]),
        ];

        if (!$filesystem->exists(['phpcs.xml', 'phpcs.xml.dist'])) {
            $config['default_standard'] = 'Hostnet';
        }

        $filesystem->dumpFile(
            Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf',
            sprintf('<?php $phpCodeSnifferConfig = %s;', var_export($config, true))
        );

        $filesystem->dumpFile(__DIR__ . '/../../../HostnetPaths/ruleset.xml', self::generateHostnetPathsXml());
    }
public static function configure(): void
    {
        $filesystem = new Filesystem();
        $config     = [
            'colors'          => '1',
            'installed_paths' => implode(',', [
                Path::VENDOR_DIR . '/hostnet/phpcs-tool/src/',
                Path::VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard',
            ]),
        ];

        if (!$filesystem->exists(['phpcs.xml', 'phpcs.xml.dist'])) {
            $config['default_standard'] = 'Hostnet';
        }

        $filesystem->dumpFile(
            Path::VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf',
            sprintf('<?php $phpCodeSnifferConfig = %s;', var_export($config, true))
        );

        $filesystem->dumpFile(__DIR__ . '/../../../HostnetPaths/ruleset.xml', self::generateHostnetPathsXml());
    }
public static function configure ( ) : void { $ filesystem = new Filesystem ( ) ; $ config = [ 'colors' => '1' , 'installed_paths' => implode ( ',' , [ Path :: VENDOR_DIR . '/hostnet/phpcs-tool/src/' , Path :: VENDOR_DIR . '/slevomat/coding-standard/SlevomatCodingStandard' , ] ) , ] ; if ( ! $ filesystem -> exists ( [ 'phpcs.xml' , 'phpcs.xml.dist' ] ) ) { $ config [ 'default_standard' ] = 'Hostnet' ; } $ filesystem -> dumpFile ( Path :: VENDOR_DIR . '/squizlabs/php_codesniffer/CodeSniffer.conf' , sprintf ( '<?php $phpCodeSnifferConfig = %s;' , var_export ( $ config , true ) ) ) ; $ filesystem -> dumpFile ( __DIR__ . '/../../../HostnetPaths/ruleset.xml' , self :: generateHostnetPathsXml ( ) ) ; }
Configure the Hostnet code style
Configure the Hostnet code style