Skip to content

Commit

Permalink
Fixed some PHPCS errors (OpenMage#3502)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Sep 8, 2023
1 parent 710d35d commit 7b20aa2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shell/rename-mysql4-class-to-resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,21 +563,21 @@
echo $search,"\n";

$files = [];
exec('grep -Hlrn "'.$search.'" app/', $files);
exec('grep -Hlrn "' . $search . '" app/', $files);

if ($search[0] == '<') {
foreach ($files as $file) {
echo ' ',$file,"\n";
file_put_contents($file, preg_replace('#[[:<:]]'.$search.'[[:>:]]#', $replace, file_get_contents($file)));
file_put_contents($file, preg_replace('#[[:<:]]'.str_replace('<', '</', $search).'[[:>:]]#', str_replace('<', '</', $replace), file_get_contents($file)));
file_put_contents($file, preg_replace('#[[:<:]]' . $search . '[[:>:]]#', $replace, file_get_contents($file)));
file_put_contents($file, preg_replace('#[[:<:]]' . str_replace('<', '</', $search) . '[[:>:]]#', str_replace('<', '</', $replace), file_get_contents($file)));
}
} else {
foreach ($files as $file) {
if (stripos($file, 'code/core') !== false) {
continue;
}
echo ' ',$file,"\n";
file_put_contents($file, preg_replace('#[[:<:]]'.$search.'[[:>:]]#', $replace, file_get_contents($file)));
file_put_contents($file, preg_replace('#[[:<:]]' . $search . '[[:>:]]#', $replace, file_get_contents($file)));
}
}
}

0 comments on commit 7b20aa2

Please sign in to comment.