Questions tagged [phpcs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

PHPStorm Xdebug not working

I like to configure and check the code flow using the X-debug break-point, so followed the below tutorial and successfully configured the X-debug in my PHP-storm, I am using php-7.2 https://www....
6
votes
0answers
624 views

Magento2 installation - Failed to set PHP CodeSniffer installed_paths Config

I am trying to install Magento2 using composer. Getting codesniffer error and tried below steps to overcome the error but unfortunately it's not going away STEP 1: Tried to install magento2 $ composer ...
0
votes
0answers
12 views

Magento2 alternative to stream_content_create

I understand Magento2 has replaced various filesystem PHP functions with their own safer version in Magento\Framework\Filesystem\Driver\File. For example get_file_contents should be called instead as $...
2
votes
2answers
3k views

Magento 2 PHPCS coding standards

I am creating a Magento 2.3 website from scratch. I am having phpcs.xml file on Magento root which contains the rules for PHPCS. These rules get triggered when the build is executed. I am confused ...
1
vote
0answers
97 views

Outdated codesniffer in MEQP2 composer.json for Magento 2.2?

How to correctly test against MEQP2 standard? Normally i use vendor/bin/phpcs --standard=PSR2 To supress errors a i use this: //phpcs:ignore or //phpcs:disable PSR2 When using MEQP2 standards ...
6
votes
3answers
750 views

Running Magento 2's Provided Code Sniffs

Magento 2 seems to include a set of PHP code sniffs in the source repository. How can I, as a third party developer, use the phpcs tool to run these sniffs against my code?