Skip to content

Commit

Permalink
Fix minor PHP issues
Browse files Browse the repository at this point in the history
  • Loading branch information
petitphp committed Oct 7, 2021
1 parent 3b090b5 commit b6c3904
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Command/ScaffoldThemeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function execute( InputInterface $input, OutputInterface $output ) {
* @author Julien Maury
* @source https://stackoverflow.com/a/7775949
*/
protected static function recursive_copy( $source, $destination ) {
protected function recursive_copy( $source, $destination ) {
foreach (
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator( $source, \RecursiveDirectoryIterator::SKIP_DOTS ),
Expand All @@ -110,7 +110,7 @@ protected static function recursive_copy( $source, $destination ) {
*
* @return bool
*/
protected static function doStrReplace( $path, $search, $replace = '', $extension = 'php' ) {
protected function doStrReplace( $path, $search, $replace = '', $extension = 'php' ) {

if ( empty( $path ) || empty( $search ) ) {
return false;
Expand All @@ -126,6 +126,7 @@ protected static function doStrReplace( $path, $search, $replace = '', $extensio
}
}

return true;
}

/**
Expand Down Expand Up @@ -223,7 +224,7 @@ protected function generateTheme( $composer, $io, $themeName, $themePath, $theme

$composerFile->write( $composerJson );
$output->writeln( "The namespace have been added to the composer.json file !" );
} catch ( RuntimeException $e ) {
} catch ( \RuntimeException $e ) {
$output->writeln( "<error>An error occurred</error>" );
$output->writeln( sprintf( "<error>%s</error>", $e->getMessage() ) );
exit;
Expand Down

0 comments on commit b6c3904

Please sign in to comment.