private static function createArticles(Collection $items) : Collection
    {
        return $items->map(function ($item) {
            return Article::create($item);
        })->filter()->sort(function ($first, $second) {
            if ($first->timestamp === $second->timestamp) {
                return strnatcmp($first->title, $second->title);
            } else {
                return $first->timestamp < $second->timestamp ? -1 : 1;
            }
        })->map(function (Article $article, $key) {
            $article->setId($key);
            return $article;
        });
    }
private static function createArticles(Collection $items) : Collection
    {
        return $items->map(function ($item) {
            return Article::create($item);
        })->filter()->sort(function ($first, $second) {
            if ($first->timestamp === $second->timestamp) {
                return strnatcmp($first->title, $second->title);
            } else {
                return $first->timestamp < $second->timestamp ? -1 : 1;
            }
        })->map(function (Article $article, $key) {
            $article->setId($key);
            return $article;
        });
    }
private static function createArticles ( Collection $ items ) : Collection { return $ items -> map ( function ( $ item ) { return Article :: create ( $ item ) ; } ) -> filter ( ) -> sort ( function ( $ first , $ second ) { if ( $ first -> timestamp === $ second -> timestamp ) { return strnatcmp ( $ first -> title , $ second -> title ) ; } else { return $ first -> timestamp < $ second -> timestamp ? - 1 : 1 ; } } ) -> map ( function ( Article $ article , $ key ) { $ article -> setId ( $ key ) ; return $ article ; } ) ; }
create article instances by paths
@param  Collection $items article paths
@return Collection        article instances
create article instances by paths