Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Commit baa633c

Browse files
authored
Merge pull request #7 from bayi/master
Ignore non php files in resources/lang folders
2 parents c45bdee + 92b6b6b commit baa633c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Generator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ private function allocateLocaleArray($path)
4444
foreach ($dir as $fileinfo) {
4545
if (!$fileinfo->isDot()) {
4646
$noExt = $this->removeExtension($fileinfo->getFilename());
47+
// Ignore non *.php files (ex.: .gitignore, vim swap files etc.)
48+
if (pathinfo($fileinfo->getFileName())['extension'] !== 'php') {
49+
continue;
50+
}
4751
$tmp = include($path . '/' . $fileinfo->getFilename());
4852

4953
$data[$noExt] = $this->adjustArray($tmp);

0 commit comments

Comments
 (0)