Commit 6efce429 authored by alexpott's avatar alexpott
Browse files

Issue #2581817 by YesCT: Follow-up for #2505263: clean up comments

parent e55daa30
......@@ -144,9 +144,9 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
foreach ($this->languageManager->getNativeLanguages() as $language) {
$langcode = $language->getId();
$links[$langcode] = array(
// We need to clone the $url object to avoid using the same one for all links.
// When the links are rendered, options are set on the $url object,
// so if we use the same one, they would be set for all links.
// We need to clone the $url object to avoid using the same one for all
// links. When the links are rendered, options are set on the $url
// object, so if we use the same one, they would be set for all links.
'url' => clone $url,
'title' => $language->getName(),
'attributes' => array('class' => array('language-link')),
......
......@@ -200,9 +200,9 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
foreach ($this->languageManager->getNativeLanguages() as $language) {
$links[$language->getId()] = array(
// We need to clone the $url object to avoid using the same one for all links.
// When the links are rendered, options are set on the $url object,
// so if we use the same one, they would be set for all links.
// We need to clone the $url object to avoid using the same one for all
// links. When the links are rendered, options are set on the $url
// object, so if we use the same one, they would be set for all links.
'url' => clone $url,
'title' => $language->getName(),
'language' => $language,
......
......@@ -394,9 +394,9 @@ protected function doTestLanguageLinkActiveClassAnonymous() {
}
/**
* Test language switcher links for session based negotiation.
* Tests language switcher links for session based negotiation.
*/
function testLanguageSessionSwitchLinks() {
public function testLanguageSessionSwitchLinks() {
// Add language.
$edit = array(
'predefined_langcode' => 'fr',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment