1

I tested my code and encountered an error on mess detector. It seems like PHP Mess Detector did not allow private methods to be prefixed with underscore as it did not fulfil mess detector requirements, and stated that the methods shall be named in camelCase.

This is the error shown

/builds/Backend/bank-simulator/web/web/app/Http/Controllers/AlbPaymexController.php:138 CamelCaseMethodName The method _checkSignature is not named in camelCase. /builds/Backend/bank-simulator/web/web/app/Http/Controllers/AlbPaymexController.php:153 CamelCaseMethodName The method _generateSignature is not named in camelCase.

However, when I tried to change the method name to camelCase, Code Style will then show this error.

Code style error

138 | ERROR | Private method name "AlbPaymexController::checkSignature" must be prefixed with an underscore

153 | ERROR | Private method name "AlbPaymexController::generateSignature" must be prefixed with an underscore

I hope someone can help me on how to resolve this issue. Thanks!

  • Both those pictures are simple text. [**Please Never** post images of code, data or error messages](https://meta.stackoverflow.com/a/285557/2310830). Please edit your question and include copy/paste the text into the question, formatted. This is so that we can try to reproduce the problem without having to re-type everything, and your question can be properly indexed or read by screen readers. – RiggsFolly May 10 '22 at 08:20
  • Sounds like you have conflicting options set in the two tools. It's up to you to decide which style is correct and configure the tools yourself. It's hard to be specific, because you haven't shown us the configuration and commands you're using. – IMSoP May 10 '22 at 11:43

0 Answers0