protected function findStoriesInFolder($folder)
{
// use the SPL to do the heavy lifting
$dirIter = new RecursiveDirectoryIterator($folder);
$recIter = new RecursiveIteratorIterator($dirIter);
$regIter = new RegexIterator($recIter, '/^.+Story\\.php$/i', RegexIterator::GET_MATCH);
// what happened?
$filenames = [];
foreach ($regIter as $match) {
$filenames[] = $match[0];
}
// let's get the list into some semblance of order
sort($filenames);
// all done
return $filenames;
}