5

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?

5

Did you try changing the line endings? Maybe SonarQube is expecting either linux or windows line endings and the file was saved with the opposite.

  • 1
    Yes. I've changed line endings to linux line endings, and then it worked. Thanks – Dr. No Dec 14 '13 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.