original_string: public static function getReferrerSummaryForVisit($visit)
      {
          $referrerType = $visit->getColumn('referrerType');
          if ($referrerType === false
              || $referrerType == 'direct'
          ) {
              return Piwik::translate('Referrers_DirectEntry');
          }
  
          if ($referrerType == 'search') {
              $referrerName = $visit->getColumn('referrerName');
  
              $keyword = $visit->getColumn('referrerKeyword');
              if ($keyword !== false
                  && $keyword != APIReferrers::getKeywordNotDefinedString()
              ) {
                  $referrerName .= ' (' . $keyword . ')';
              }
              return $referrerName;
          }
  
          if ($referrerType == 'campaign') {
  
              $summary = Piwik::translate('Referrers_ColumnCampaign') . ': ' . $visit->getColumn('referrerName');
              $keyword = $visit->getColumn('referrerKeyword');
              if (!empty($keyword)) {
                  $summary .= ' - ' . $keyword;
              }
  
              return $summary;
          }
  
          return $visit->getColumn('referrerName');
      }
code: public static function getReferrerSummaryForVisit($visit)
      {
          $referrerType = $visit->getColumn('referrerType');
          if ($referrerType === false
              || $referrerType == 'direct'
          ) {
              return Piwik::translate('Referrers_DirectEntry');
          }
  
          if ($referrerType == 'search') {
              $referrerName = $visit->getColumn('referrerName');
  
              $keyword = $visit->getColumn('referrerKeyword');
              if ($keyword !== false
                  && $keyword != APIReferrers::getKeywordNotDefinedString()
              ) {
                  $referrerName .= ' (' . $keyword . ')';
              }
              return $referrerName;
          }
  
          if ($referrerType == 'campaign') {
  
              $summary = Piwik::translate('Referrers_ColumnCampaign') . ': ' . $visit->getColumn('referrerName');
              $keyword = $visit->getColumn('referrerKeyword');
              if (!empty($keyword)) {
                  $summary .= ' - ' . $keyword;
              }
  
              return $summary;
          }
  
          return $visit->getColumn('referrerName');
      }
code_tokens: public static function getReferrerSummaryForVisit ( $ visit ) { $ referrerType = $ visit -> getColumn ( 'referrerType' ) ; if ( $ referrerType === false || $ referrerType == 'direct' ) { return Piwik :: translate ( 'Referrers_DirectEntry' ) ; } if ( $ referrerType == 'search' ) { $ referrerName = $ visit -> getColumn ( 'referrerName' ) ; $ keyword = $ visit -> getColumn ( 'referrerKeyword' ) ; if ( $ keyword !== false && $ keyword != APIReferrers :: getKeywordNotDefinedString ( ) ) { $ referrerName .= ' (' . $ keyword . ')' ; } return $ referrerName ; } if ( $ referrerType == 'campaign' ) { $ summary = Piwik :: translate ( 'Referrers_ColumnCampaign' ) . ': ' . $ visit -> getColumn ( 'referrerName' ) ; $ keyword = $ visit -> getColumn ( 'referrerKeyword' ) ; if ( ! empty ( $ keyword ) ) { $ summary .= ' - ' . $ keyword ; } return $ summary ; } return $ visit -> getColumn ( 'referrerName' ) ; }
docstring: Returns a summary for a visit's referral.
  
  @param DataTable\Row $visit
  @return bool|mixed|string
docstring_tokens: Returns a summary for a visit s referral .