read())) { if ($entry === '.' || $entry === '..') { continue; } $fn = $dir->path . '/' . $entry; if (is_dir($fn)) { $changlogs = array_merge($changlogs, $this->collectChangelogs(dir($fn))); continue; } list($extension, $basename) = explode('.', strrev($entry), 2); $extension = strrev($extension); $basename = strrev($basename); if ($extension !== 'changes') { continue; } if ($basename[0] === '_') { continue; } $changlogs[] = $dir->path . '/' . $entry; } return $changlogs; } }