0

I have tested my module2 module with https://github.com/magento/marketplace-eqp

I execute the following command

$ vendor/bin/phpcs /var/www/my/module --standard=MEQP2

I got the following warnings

Use of protected class members is discouraged.
Property name "$_pageFactory" should not be prefixed with an underscore to indicate visibility

My code is

protected $_pageFactory;

What should i do to remove those warnings?

I also got warning

Line exceeds 120 characters; contains 129 characters

How do i remove this warning?

Also got

"resource" is a reserved word in PHP 7

Code is namespace Blaze\Intely\Model\Resource\Myorders; I create folder Resource inside model so i use Resource in namespace I also search some examples they use Resource in namespace

1

This are the general errors that are generated based on the standards. This errors itself tells what you need to change to fix them.

  • change protected to public.
  • remove underscore change $_pageFactoryto $pageFactory
  • Line exceeds 120 characters; contains 129 characters -> break the code of this line in more than one line (check the link I added below for better understanding).
  • resource is reserved key word so use any other keyword in place of it.

for more errors and there solutions please check awesome answer here-How to fix warnings / errors raised by the Magento Marketplace technical review report?

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.