dongyuan6949 2013-12-11 10:33
浏览 76
已采纳

“每个PHP语句必须独立于一行”Sonarqube模式错误

I'm analyzing a PHP code using Sonarqube, and I've noticed that in almost all files I have this error:

"Each PHP statement must be on a line by itself" (DisallowMultipleStatementsSameLine)

But when I check this files seems that there is no error.

For example, in this file the error is raised:

<?php
/**
 * Category of the question
 */
class Category {
    public $categoryId;
    public $name;
}
?>

How can be?

  • 写回答

2条回答 默认 最新

  • donglang9880 2013-12-14 11:43
    关注

    The problem was the line endings. Changing the line endings to "Linux line endings" makes the problem disapear

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?