我正在使用密碼工具模塊,其中一部分使用base64編碼/解碼。因此,我有很多變量,包括術語'base64',原因很明顯。問題是,當我運行PHP_CodeSniffer工具時,它會拋出警告:「Variable」... 64「包含數字,但不鼓勵」。使用PHP_CodeSniffer忽略特定警告
有什麼辦法告訴PHP_CodeSniffer忽略這個特定文件的警告嗎?我敢肯定,有一個很好的理由,以避免數字,但在這種情況下,我寧願使用「的base64」比「baseSixtyFour」 ...
這是怎麼了,我跑PHP_CodeSniffer:
[email protected]:~/workspace/library$ phpcs --standard=ZEND ./Tools/
FILE: /home/valorin/workspace/library/Tools/Password.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 6 WARNING(S) AFFECTING 5 LINE(S)
--------------------------------------------------------------------------------
38 | WARNING | Variable "_bEncryptionBase64" contains numbers but this is
| | discouraged
94 | WARNING | Variable "_bEncryptionBase64" contains numbers but this is
| | discouraged
94 | WARNING | Variable "base64" contains numbers but this is discouraged
95 | WARNING | Variable "base64" contains numbers but this is discouraged
210 | WARNING | Variable "bEncryptionBase64" contains numbers but this is
| | discouraged
251 | WARNING | Variable "bEncryptionBase64" contains numbers but this is
| | discouraged
--------------------------------------------------------------------------------
Time: 1 second, Memory: 7.50Mb
問題是,我需要把它們放在變量的每一次使用(這是頻繁的),所以這是一個非常混亂的解決方案... –