original_string: protected function setRequestDefaults(array $cookies, $host, $path)
      {
          $out = [];
          foreach ($cookies as $name => $cookie) {
              if (!$cookie->getDomain()) {
                  $cookie = $cookie->withDomain($host);
              }
              if (!$cookie->getPath()) {
                  $cookie = $cookie->withPath($path);
              }
              $out[] = $cookie;
          }
  
          return $out;
      }
code: protected function setRequestDefaults(array $cookies, $host, $path)
      {
          $out = [];
          foreach ($cookies as $name => $cookie) {
              if (!$cookie->getDomain()) {
                  $cookie = $cookie->withDomain($host);
              }
              if (!$cookie->getPath()) {
                  $cookie = $cookie->withPath($path);
              }
              $out[] = $cookie;
          }
  
          return $out;
      }
code_tokens: protected function setRequestDefaults ( array $ cookies , $ host , $ path ) { $ out = [ ] ; foreach ( $ cookies as $ name => $ cookie ) { if ( ! $ cookie -> getDomain ( ) ) { $ cookie = $ cookie -> withDomain ( $ host ) ; } if ( ! $ cookie -> getPath ( ) ) { $ cookie = $ cookie -> withPath ( $ path ) ; } $ out [ ] = $ cookie ; } return $ out ; }
docstring: Apply path and host to the set of cookies if they are not set.
  
  @param array $cookies An array of cookies to update.
  @param string $host The host to set.
  @param string $path The path to set.
  @return array An array of updated cookies.
docstring_tokens: Apply path and host to the set of cookies if they are not set .