protected static function generateConfig($releases, $phpFile)
    {
        $data = '<?php' . PHP_EOL;
        $data .= '// DO NOT EDIT! This file has been automatically generated.' . PHP_EOL;
        $data .= '// Run composer update to fetch a new version.' . PHP_EOL;
        $data .= 'return array(' . PHP_EOL;
        foreach ($releases as $version => $date) {
            $data .= '   \'' . $version . '\' => \'' . $date . '\',' . PHP_EOL;
        }
        $data .= ');' . PHP_EOL;

        file_put_contents($phpFile, $data);
    }
protected static function generateConfig($releases, $phpFile)
    {
        $data = '<?php' . PHP_EOL;
        $data .= '// DO NOT EDIT! This file has been automatically generated.' . PHP_EOL;
        $data .= '// Run composer update to fetch a new version.' . PHP_EOL;
        $data .= 'return array(' . PHP_EOL;
        foreach ($releases as $version => $date) {
            $data .= '   \'' . $version . '\' => \'' . $date . '\',' . PHP_EOL;
        }
        $data .= ');' . PHP_EOL;

        file_put_contents($phpFile, $data);
    }
protected static function generateConfig ( $ releases , $ phpFile ) { $ data = '<?php' . PHP_EOL ; $ data .= '// DO NOT EDIT! This file has been automatically generated.' . PHP_EOL ; $ data .= '// Run composer update to fetch a new version.' . PHP_EOL ; $ data .= 'return array(' . PHP_EOL ; foreach ( $ releases as $ version => $ date ) { $ data .= '   \'' . $ version . '\' => \'' . $ date . '\',' . PHP_EOL ; } $ data .= ');' . PHP_EOL ; file_put_contents ( $ phpFile , $ data ) ; }
Generate a PHP configuration file from the CSV data file.

@since 0.1.0

@param array  $releases Array of strings representing release version numbers.
@param string $phpFile  Path to the PHP file.
Generate a PHP configuration file from the CSV data file .