Skip to main content

Questions tagged [magento-coding-standard]

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Magento 2 Coding Practice

recently I came across one developer's code in magento 2, where he was accessing objects in another class to avoid dependency injections. Like for example we have Vendor\Feature\Helpler\Data class and ...
Knight017's user avatar
  • 632
0 votes
1 answer
732 views

How to setup magento coding standard for the Magento 2 version

I am trying to set the magento coding standard in the Magento 2 version. I followed this link: https://github.com/magento-ecg/coding-standard. When I check code sniffer for the directory path: /...
Manoj Jarial's user avatar
0 votes
2 answers
351 views

How Can I check Coding Standards Of my module for magento 2.4.4 and php 8.1?

My extension have failed the coding standards of magento marketplace how can i check coding standards i have magento 2.4.4 installed and php 8.1.
Magento2-learner's user avatar
0 votes
1 answer
294 views

installed magento marketplace coding standard plugin but it throws error Array and string offset access syntax with curly braces

Tried https://github.com/magento/marketplace-eqp . Getting error PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in vendor/squizlabs/php_codesniffer/src/Config....
Sandeep Shetane's user avatar
-4 votes
1 answer
37 views

How to Standard Coding base on Magento Architecture For Query optimization

How to Optimization magento1 & 2 default Products, Order, Customer, Wishlist etc.. collection query?
Bhavesh Godhani's user avatar
0 votes
1 answer
30 views

@return description in magento-coding-standard

I am currently working on bringing my extensions to the current coding standard. So, when writing a function, normally I would describe it the following way: protected function exampleFunction(string $...
Mario's user avatar
  • 498
0 votes
0 answers
136 views

Regarding Magento Coding Standard Reject include_once statement

I am using some third-party module file in my custom extension and need to include that .inc file via include_once but when I check that module via Magento 2 code standard check command. It is showing ...
Aish's user avatar
  • 81
0 votes
1 answer
2k views

What is use of declare(strict_types=1) in Magento 2?

Why core file use this declare(strict_types=1) ?
Jitendra Patel's user avatar
0 votes
1 answer
411 views

Magento2 | The use of function getallheaders(), base64_decode(), rawurldecode() is discouraged

The use of function getallheaders(), base64_decode(), rawurldecode() is discouraged. What are the alternative for these in Magento2
explorer's user avatar
1 vote
0 answers
369 views

magento-coding-standard how to make magento 2 standard work?

i'am install this https://github.com/magento/magento-coding-standard, i installed it via composer and i see there is a package in vendor/magento/magento-coding-standard, and also i modified composer....
hkguile's user avatar
  • 2,221