original_string: public function getCoverImage()
      {
          if ($this->coverImage)
          {
              return $this->coverImage;
          }
  
          $modelName = source_model_name($this->getNodeTypeName(), true);
  
          $mutatables = call_user_func([$modelName, 'getMutatables']);
  
          foreach ($mutatables as $mutatable => $type)
          {
              if ($type === 'gallery' && ($images = $this->getTranslationAttribute($mutatable, null, true, true)))
              {
                  if ($cover = get_nuclear_cover($images))
                  {
                      $this->coverImage = $cover;
  
                      return $cover;
                  }
              }
  
              if ($type === 'document' && ($document = $this->getTranslationAttribute($mutatable, null, true, true)))
              {
                  if ($document = get_nuclear_cover($document))
                  {
                      $this->coverImage = $document;
  
                      return $document;
                  }
              }
          }
  
          return null;
      }
code: public function getCoverImage()
      {
          if ($this->coverImage)
          {
              return $this->coverImage;
          }
  
          $modelName = source_model_name($this->getNodeTypeName(), true);
  
          $mutatables = call_user_func([$modelName, 'getMutatables']);
  
          foreach ($mutatables as $mutatable => $type)
          {
              if ($type === 'gallery' && ($images = $this->getTranslationAttribute($mutatable, null, true, true)))
              {
                  if ($cover = get_nuclear_cover($images))
                  {
                      $this->coverImage = $cover;
  
                      return $cover;
                  }
              }
  
              if ($type === 'document' && ($document = $this->getTranslationAttribute($mutatable, null, true, true)))
              {
                  if ($document = get_nuclear_cover($document))
                  {
                      $this->coverImage = $document;
  
                      return $document;
                  }
              }
          }
  
          return null;
      }
code_tokens: public function getCoverImage ( ) { if ( $ this -> coverImage ) { return $ this -> coverImage ; } $ modelName = source_model_name ( $ this -> getNodeTypeName ( ) , true ) ; $ mutatables = call_user_func ( [ $ modelName , 'getMutatables' ] ) ; foreach ( $ mutatables as $ mutatable => $ type ) { if ( $ type === 'gallery' && ( $ images = $ this -> getTranslationAttribute ( $ mutatable , null , true , true ) ) ) { if ( $ cover = get_nuclear_cover ( $ images ) ) { $ this -> coverImage = $ cover ; return $ cover ; } } if ( $ type === 'document' && ( $ document = $ this -> getTranslationAttribute ( $ mutatable , null , true , true ) ) ) { if ( $ document = get_nuclear_cover ( $ document ) ) { $ this -> coverImage = $ document ; return $ document ; } } } return null ; }
docstring: Gets the cover image
  
  @return Image|null
docstring_tokens: Gets the cover image