PSRs is a PHP specification published by the PHP Framework Interop Group. It serves the standardization of programming concepts in PHP. The aim is to enable interoperability among components like frameworks, libraries, & projects.
The PSRs encompass different facets of PHP development, covering coding style, autoloading, coding standards, and HTTP message interfaces. Among the frequently cited PSRs are PSR-1, PSR-2, PSR-4, PSR-7, and PSR-12.

PSR.php
// Invalid way to write the Coding standards.
<?php
$a = 20;
$b = 10;
if($a > $b)
{
echo “a is greater than b”;
}

Before using php_codesniffer, let’s establish a Composer,
For Ubuntu use this ref:
After installing composer, Then, in your terminal, execute the following command:-
After Hitting gedit~/.profile command, instantly open your .profile page & you can additionally add the below lines in the last:
# Set PHPCS path in profile
export PATH=~/.config/composer/vendor/bin:$PATH

Now you can check your file, show errors of Coding Standards
And, here you will even get to know where you are making mistakes & why the code is facing issues while getting executed. Through this, you will be able to rectify them to let the code work smoothly.
At LN Webworks, our group of experts in Drupal are always prepared to help you make it happen. Get in touch with us right now to schedule a free consultation.
Other, SaaS Development
SaaS CRMs win on speed. Custom wins on fit and ownership. This isn’t a pitch for either one. Every early-stage SaaS company hits this decision within the first year, usually right after the founder realizes a spreadsheet isn’t a CRM. The default answer is almost always a SaaS CRM: HubSpot, Salesforce, Zoho, sign up in […]
Other
Most “audits” and “assessments” promise clarity but deliver a sales deck with language that lacks clarity. You book the call expecting evidence about your specific platform, and what shows up is a generic pitch for whichever package is easiest for the firm to sell. That’s the actual reason process transparency matters here, not because a […]
Other
In late June and early July, videos started circulating on Instagram of people walking up to moving e-rickshaws, tapping a phone, and watching the vehicle lose power mid-ride. It spread as a prank trend before anyone fully understood the mechanism. Drivers in Patna (India) reported it first, assuming mechanical failure, until investigators traced it to […]