code: public function getMigrationFiles(string $type): array
      {
          $array = [];
          foreach ($this->filesystem->listContents() as $file) {
              if ($type === pathinfo($file['filename'], PATHINFO_EXTENSION)) {
                  $array[] = $file;
              }
          }
  
          return $array;
      }
docs: Get all of the migration files in a given path.
  
  @param string $type
  @return array