فهرست منبع

Strict comparison in Tokenizer

Dariusz Rumiński 11 سال پیش
والد
کامیت
01d03d91df
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      src/Mustache/Tokenizer.php

+ 4 - 4
src/Mustache/Tokenizer.php

@@ -116,7 +116,7 @@ class Mustache_Tokenizer
                     } else {
                         $char = $text[$i];
                         $this->buffer .= $char;
-                        if ($char == "\n") {
+                        if ($char === "\n") {
                             $this->flushBuffer();
                             $this->line++;
                         }
@@ -157,14 +157,14 @@ class Mustache_Tokenizer
                             self::OTAG  => $this->otag,
                             self::CTAG  => $this->ctag,
                             self::LINE  => $this->line,
-                            self::INDEX => ($this->tagType == self::T_END_SECTION) ? $this->seenTag - $this->otagLen : $i + $this->ctagLen
+                            self::INDEX => ($this->tagType === self::T_END_SECTION) ? $this->seenTag - $this->otagLen : $i + $this->ctagLen
                         );
 
                         $this->buffer = '';
                         $i += $this->ctagLen - 1;
                         $this->state = self::IN_TEXT;
-                        if ($this->tagType == self::T_UNESCAPED) {
-                            if ($this->ctag == '}}') {
+                        if ($this->tagType === self::T_UNESCAPED) {
+                            if ($this->ctag === '}}') {
                                 $i++;
                             } else {
                                 // Clean up `{{{ tripleStache }}}` style tokens.