From b7374dd21c78ddc895f35f45391ba9d06c8aad55 Mon Sep 17 00:00:00 2001
From: Hanne Moa <hanne.moa@uninett.no>
Date: Thu, 15 Sep 2016 13:48:43 +0200
Subject: [PATCH] Make `noop()` static

This makes instanciating the Translate/Template-class unnecessary.
---
 lib/SimpleSAML/Locale/Translate.php | 2 +-
 lib/SimpleSAML/XHTML/Template.php   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php
index 888c0773e..004a7cd81 100644
--- a/lib/SimpleSAML/Locale/Translate.php
+++ b/lib/SimpleSAML/Locale/Translate.php
@@ -228,7 +228,7 @@ class Translate
      *
      * @return string The tag, unchanged.
      */
-    public function noop($tag)
+    static public function noop($tag)
     {
         return $tag;
     }
diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index af9716249..1ebd2fbfc 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -567,14 +567,14 @@ class SimpleSAML_XHTML_Template
 
 
     /**
-     * Wrap Language->noop to mark a tag for translation but actually do it later.
+     * Behave like Language->noop to mark a tag for translation but actually do it later.
      *
      * @see \SimpleSAML\Locale\Translate::noop()
-     * @deprecated This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::t() instead.
+     * @deprecated This method will be removed in SSP 2.0. Please use \SimpleSAML\Locale\Translate::noop() instead.
      */
-    public function noop($tag)
+    static public function noop($tag)
     {
-        return $this->translator->noop($tag);
+        return $tag;
     }
 
 
-- 
GitLab