File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed 
php/php-codesniffer-standard/VIISON/Sniffs/Strings Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44use  PHP_CodeSniffer \Files \File ;
55use  PHP_CodeSniffer \Sniffs \Sniff ;
66
7- // phpcs:disable VIISON.Strings.DateMethodsInSqlSniff .NoNow 
8- // phpcs:disable VIISON.Strings.DateMethodsInSqlSniff .NoCurrentTimestamp 
7+ // phpcs:disable VIISON.Strings.DateMethodsInSql .NoNow 
8+ // phpcs:disable VIISON.Strings.DateMethodsInSql .NoCurrentTimestamp 
99
1010/** 
1111 * This sniff disallows the usage of the method NOW() and CURRENT_TIMESTAMP() in SQL queries as they have weird 
@@ -33,12 +33,12 @@ public function process(File $phpcsFile, $stackPtr)
3333        $ token  = $ phpcsFile ->getTokens ()[$ stackPtr ];
3434        $ content  = $ token ['content ' ];
3535
36-         if  (stripos ($ content , 'NOW( ' ) !== false ) {
36+         if  (mb_stripos ($ content , 'NOW( ' ) !== false ) {
3737            $ error  = 'The usage of the method NOW() in SQL queries is not allowed. Use UTC_TIMESTAMP() instead. ' ;
3838            $ phpcsFile ->addError ($ error , $ stackPtr , 'NoNow ' );
3939        }
4040
41-         if  (stripos ($ content , 'CURRENT_TIMESTAMP( ' ) !== false ) {
41+         if  (mb_stripos ($ content , 'CURRENT_TIMESTAMP( ' ) !== false ) {
4242            $ error  = 'The usage of the method CURRENT_TIMESTAMP() in SQL queries is not allowed. Use UTC_TIMESTAMP() instead. ' ;
4343            $ phpcsFile ->addError ($ error , $ stackPtr , 'NoCurrentTimestamp ' );
4444        }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments