Skip to content

Commit 073073d

Browse files
committed
Merge pull request #41 from fergthh/issue-34
Fix issues #33 & #34
2 parents 3089558 + 7895c82 commit 073073d

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

src/Manager.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,29 @@ public function files()
7979
// main language files of the application, in this case we will
8080
// neglect all vendor files.
8181
if (! Str::contains($this->path, 'vendor')) {
82-
$filesByFile = $filesByFile->filter(function ($value, $key) {
83-
return ! Str::contains($key, ':');
84-
});
82+
$filesByFile = $this->neglectVendorFiles($filesByFile);
83+
}
84+
85+
return $filesByFile;
86+
}
87+
88+
/**
89+
* Nelgect all vendor files.
90+
*
91+
* @param $filesByFile Collection
92+
* @return array
93+
*/
94+
private function neglectVendorFiles($filesByFile)
95+
{
96+
$return = [];
97+
98+
foreach ($filesByFile->toArray() as $key => $value) {
99+
if (! Str::contains($key, ':')) {
100+
$return[$key] = $value;
101+
}
85102
}
86103

87-
return $filesByFile->toArray();
104+
return $return;
88105
}
89106

90107
/**

0 commit comments

Comments
 (0)