/**
  * {@inheritdoc}
  */
 public function create(array $data = [])
 {
     if (!$data) {
         return null;
     }
     $tvSeason = new Season();
     if (array_key_exists('credits', $data)) {
         if (array_key_exists('cast', $data['credits']) && $data['credits']['cast'] !== null) {
             $tvSeason->getCredits()->setCast($this->getCastFactory()->createCollection($data['credits']['cast'], new CastMember()));
         }
         if (array_key_exists('crew', $data['credits']) && $data['credits']['crew'] !== null) {
             $tvSeason->getCredits()->setCrew($this->getCrewFactory()->createCollection($data['credits']['crew'], new CrewMember()));
         }
     }
     /** External ids */
     if (array_key_exists('external_ids', $data) && $data['external_ids'] !== null) {
         $tvSeason->setExternalIds($this->hydrate(new ExternalIds(), $data['external_ids']));
     }
     /** Images */
     if (array_key_exists('images', $data) && $data['images'] !== null) {
         $tvSeason->setImages($this->getImageFactory()->createCollectionFromTvSeason($data['images']));
     }
     if (array_key_exists('poster_path', $data)) {
         $tvSeason->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path'));
     }
     /** Episodes */
     if (array_key_exists('episodes', $data) && $data['episodes'] !== null) {
         $tvSeason->setEpisodes($this->getTvEpisodeFactory()->createCollection($data['episodes']));
     }
     if (array_key_exists('videos', $data) && $data['videos'] !== null) {
         $tvSeason->setVideos($this->getVideoFactory()->createCollection($data['videos']));
     }
     if (array_key_exists('changes', $data) && $data['changes'] !== null) {
         $tvSeason->setChanges($this->getChangesFactory()->createCollection($data['changes']));
     }
     return $this->hydrate($tvSeason, $data);
 }