によって分析されると、php ファイルのコードの一部を無視することができますPHP_CodeSniffer
。
21820 次
3 に答える
84
はい、 @codingStandardsIgnoreStart および @codingStandardsIgnoreEnd アノテーションで可能です
<?php
some_code();
// @codingStandardsIgnoreStart
this_will_be_ignored();
// @codingStandardsIgnoreEnd
some_other_code();
ドキュメントにも記載されています。
于 2010-11-29T18:29:43.777 に答える
34
@codingStandardsIgnoreStart
との組み合わせを使用することも、 を使用することも@codingStandardsIgnoreEnd
できます@codingStandardsIgnoreLine
。
例:
<?php
command1();
// @codingStandardsIgnoreStart
command2(); // this line will be ignored by Codesniffer
command3(); // this one too
command4(); // this one too
// @codingStandardsIgnoreEnd
command6();
// @codingStandardsIgnoreLine
command7(); // this line will be ignored by Codesniffer
于 2015-06-10T11:09:00.383 に答える