Browse Source

Remove useless methods and make in_array typehint

LifeOrYou 8 years ago
parent
commit
93ae9b92a7
1 changed files with 1 additions and 22 deletions
  1. 1 22
      src/Utility/Text.php

+ 1 - 22
src/Utility/Text.php

@@ -619,7 +619,7 @@ class Text
             preg_match_all('/(<\/?([\w+]+)[^>]*>)?([^<>]*)/', $text, $tags, PREG_SET_ORDER);
             foreach ($tags as $tag) {
                 $contentLength = 0;
-                if (!in_array($tag[2], static::$_defaultHtmlNoCount)) {
+                if (!in_array($tag[2], static::$_defaultHtmlNoCount, true)) {
                     $contentLength = self::_strlen($tag[3], $options);
                 }
 
@@ -1133,25 +1133,4 @@ class Text
 
         return $string;
     }
-
-    /**
-     * Get default html tags not counted for truncate.
-     *
-     * @return array Html tags.
-     */
-    public static function getHtmlNoCount()
-    {
-        return static::$_defaultHtmlNoCount;
-    }
-
-    /**
-     * Set html tags not counted for truncate.
-     *
-     * @param array $htmlNoCount New html tags not counted for truncate.
-     * @return void
-     */
-    public static function setHtmlNoCount($htmlNoCount)
-    {
-        static::$_defaultHtmlNoCount = $htmlNoCount;
-    }
 }