original_string: public function urlForDefaultUserParams($websiteId = false, $defaultPeriod = false, $defaultDate = false)
      {
          $userPreferences = new UserPreferences();
          if (empty($websiteId)) {
              $websiteId = $userPreferences->getDefaultWebsiteId();
          }
          if (empty($websiteId)) {
              throw new \Exception("A website ID was not specified and a website to default to could not be found.");
          }
          if (empty($defaultDate)) {
              $defaultDate = $userPreferences->getDefaultDate();
          }
          if (empty($defaultPeriod)) {
              $defaultPeriod = $userPreferences->getDefaultPeriod(false);
          }
          return array(
              'idSite' => $websiteId,
              'period' => $defaultPeriod,
              'date'   => $defaultDate,
          );
      }
code: public function urlForDefaultUserParams($websiteId = false, $defaultPeriod = false, $defaultDate = false)
      {
          $userPreferences = new UserPreferences();
          if (empty($websiteId)) {
              $websiteId = $userPreferences->getDefaultWebsiteId();
          }
          if (empty($websiteId)) {
              throw new \Exception("A website ID was not specified and a website to default to could not be found.");
          }
          if (empty($defaultDate)) {
              $defaultDate = $userPreferences->getDefaultDate();
          }
          if (empty($defaultPeriod)) {
              $defaultPeriod = $userPreferences->getDefaultPeriod(false);
          }
          return array(
              'idSite' => $websiteId,
              'period' => $defaultPeriod,
              'date'   => $defaultDate,
          );
      }
code_tokens: public function urlForDefaultUserParams ( $ websiteId = false , $ defaultPeriod = false , $ defaultDate = false ) { $ userPreferences = new UserPreferences ( ) ; if ( empty ( $ websiteId ) ) { $ websiteId = $ userPreferences -> getDefaultWebsiteId ( ) ; } if ( empty ( $ websiteId ) ) { throw new \ Exception ( "A website ID was not specified and a website to default to could not be found." ) ; } if ( empty ( $ defaultDate ) ) { $ defaultDate = $ userPreferences -> getDefaultDate ( ) ; } if ( empty ( $ defaultPeriod ) ) { $ defaultPeriod = $ userPreferences -> getDefaultPeriod ( false ) ; } return array ( 'idSite' => $ websiteId , 'period' => $ defaultPeriod , 'date' => $ defaultDate , ) ; }
docstring: Returns the &idSite=X&period=Y&date=Z query string fragment,
  fetched from current logged-in user's preferences.
  
  @param bool $websiteId
  @param bool $defaultPeriod
  @param bool $defaultDate
  @return string eg '&idSite=1&period=week&date=today'
  @throws \Exception in case a website was not specified and a default website id could not be found
docstring_tokens: Returns the &idSite = X&period = Y&date = Z query string fragment fetched from current logged - in user s preferences .