JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr#!/usr/bin/env php "); writeln("Namespace : {$vendorNamespace}\\{$className}"); writeln("Class name : {$className}"); writeln('------'); writeln('This script will replace the above values in all relevant files in the project directory.'); if (! confirm('Modify files?', true)) { exit(1); } $files = (str_starts_with(strtoupper(PHP_OS), 'WIN') ? replaceForWindows() : replaceForAllOtherOSes()); foreach ($files as $file) { replace_in_file($file, [ ':author_name' => $authorName, ':author_username' => $authorUsername, 'author@domain.com' => $authorEmail, ':vendor_name' => $vendorName, ':vendor_slug' => $vendorSlug, 'VendorName' => $vendorNamespace, ':package_name' => $packageName, ':package_slug' => $packageSlug, 'Skeleton' => $className, 'skeleton' => $packageSlug, ':package_description' => $description, ]); match (true) { str_contains($file, 'src/Skeleton.php') => rename($file, './src/' . $className . '.php'), str_contains($file, 'src/SkeletonServiceProvider.php') => rename($file, './src/' . $className . 'ServiceProvider.php'), str_contains($file, 'src/SkeletonFacade.php') => rename($file, './src/' . $className . 'Facade.php'), str_contains($file, 'src/Commands/SkeletonCommand.php') => rename($file, './src/Commands/' . $className . 'Command.php'), str_contains($file, 'database/migrations/create_skeleton_table.php.stub') => rename($file, './database/migrations/create_' . $packageSlugWithoutPrefix . '_table.php.stub'), str_contains($file, 'config/skeleton.php') => rename($file, './config/' . $packageSlugWithoutPrefix . '.php'), default => [], }; } confirm('Execute `composer install` and run tests?') && run('composer install && composer test'); confirm('Let this script delete itself?', true) && unlink(__FILE__);