Skip to content

Commit be22eb9

Browse files
carusogabrieltheofidry
authored andcommitted
Destructure array in foreach loops (#204)
1 parent a095ee2 commit be22eb9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Console/Command/AddPrefixCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ private function scopeFiles(
182182
$vendorDirs = [];
183183
$commonPath = get_common_path(array_keys($filesWithContents));
184184

185-
foreach ($filesWithContents as $fileWithContents) {
186-
[$inputFilePath, $inputContents] = $fileWithContents;
187-
185+
foreach ($filesWithContents as [$inputFilePath, $inputContents]) {
188186
$outputFilePath = $output.str_replace($commonPath, '', $inputFilePath);
189187

190188
if (preg_match('~((?:.*)\/vendor)\/.*~', $outputFilePath, $matches)) {

0 commit comments

Comments
 (0)