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

Commit

Permalink
Merge pull request #7 from bayi/master
Browse files Browse the repository at this point in the history
Ignore non php files in resources/lang folders
  • Loading branch information
martinlindhe authored Nov 1, 2016
2 parents c45bdee + 92b6b6b commit baa633c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ private function allocateLocaleArray($path)
foreach ($dir as $fileinfo) {
if (!$fileinfo->isDot()) {
$noExt = $this->removeExtension($fileinfo->getFilename());
// Ignore non *.php files (ex.: .gitignore, vim swap files etc.)
if (pathinfo($fileinfo->getFileName())['extension'] !== 'php') {
continue;
}
$tmp = include($path . '/' . $fileinfo->getFilename());

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

0 comments on commit baa633c

Please sign in to comment.