original_string: public static function getSiteIdFromMetadata(DataTable $table)
      {
          $site = $table->getMetadata('site');
          if (empty($site)) {
              return null;
          } else {
              return $site->getId();
          }
      }
code: public static function getSiteIdFromMetadata(DataTable $table)
      {
          $site = $table->getMetadata('site');
          if (empty($site)) {
              return null;
          } else {
              return $site->getId();
          }
      }
code_tokens: public static function getSiteIdFromMetadata ( DataTable $ table ) { $ site = $ table -> getMetadata ( 'site' ) ; if ( empty ( $ site ) ) { return null ; } else { return $ site -> getId ( ) ; } }
docstring: Returns the ID of the site a table is related to based on the 'site' metadata entry,
  or null if there is none.
  
  @param DataTable $table
  @return int|null
docstring_tokens: Returns the ID of the site a table is related to based on the site metadata entry or null if there is none .