Fragen\GitHub_Updater\Base::get_changelog_filename PHP Метод

get_changelog_filename() защищенный Метод

Get filename of changelog and return.
protected get_changelog_filename ( $type ) : boolean | string
$type
Результат boolean | string
    protected function get_changelog_filename($type)
    {
        $changelogs = array('CHANGES.md', 'CHANGELOG.md', 'changes.md', 'changelog.md');
        $changes = null;
        $local_files = null;
        if (is_dir($this->{$type}->local_path)) {
            $local_files = scandir($this->{$type}->local_path);
        } elseif (is_dir($this->{$type}->local_path_extended)) {
            $local_files = scandir($this->{$type}->local_path_extended);
        }
        $changes = array_intersect((array) $local_files, $changelogs);
        $changes = array_pop($changes);
        if (!empty($changes)) {
            return $changes;
        }
        return false;
    }