code: private function flip(array $resources)
      {
          $all = [];
  
          foreach ($resources as $resourceType => $types) {
              foreach ((array) $types as $type) {
                  $all[$type] = $resourceType;
              }
          }
  
          return $all;
      }
docs: Key the resource array by domain record type.
  
  @param array $resources
  @return array