I was working on a command line application and I have this class that handles the business logic. This class has some method that loops all data from ...
I was working on a command line application and I have this class that handles the business logic. This class has some method that loops all data from ...
PSR-1 includes recommendation 2.3. Side Effects: A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side e ...
I have looked through the PHP-Fig website for any PSR related to alternative PHP syntax for control structures but failed to find anything about it. ...
I have a group of Serializer classes that I want to put under a namespace. How would I call those classes and their filenames according to PSR? Shoul ...
I need to know if I'am allowed to use single row if-statements according to the PSR-2 Coding Style. I've already read the docs but i couldn't find an ...
I've seen a lot of posts talking about why alternative Syntax in PHP is good/bad. It's not the topic, I'm a convention lover and I want to know if th ...
I can't find anything saying in PSR about where should placed comment about class and namespace. Is it should be first description of class or namespa ...
I want my IDE (PhpStorm) to enforce PSR-2 compatible formatting on all of own files. Occasionally however, I have to submit patches on legacy code whe ...
I am in the process of making my code base PSR-2 compliant (and therefore PSR-1 compliant) and I have come across the following code: Which is used ...
I have this code: And I am using NetBeans 8.2 with PSR-1 compatibility check turned on. And I am getting this error: Why is that and how can I f ...
Can anyone advise where in the PSR standards docs it documents that there should be nothing after the variable type in class member variables? I used ...
I have a laravel application (created with composer) that I am trying to ensure meets PHP coding standards (level PSR-1). I run: And within a few s ...
I am trying to make my php code psr-1 psr-2 compliant Don't i am getting some weird errors actually i am not understanding what exactly it want me to ...
Maybe I don't understand fully. I read that PSR is PHP Standard Recommendation, but there are several version of PSR, For Example autoloader use PSR-4 ...
PSR suggests, method names MUST be declared in camelCase and class names MUST be declared in StudlyCaps. ...
As I understood according to PSR-2 standard we should capitalize directory names which contain classes. But how to do if the directory also contains s ...
The PSR coding standards are very clear about most of their conventions, including the very first entry in PSR-1: PHP code MUST use the long <? ...
Lately I'm trying to adapt to the PSR standard. On the PSR-1 document it is stated that: Files SHOULD either declare symbols (classes, functions, ...
I'm trying to take into consideration the PSR-0 and PSR-1 recommendations made by my IDE (Netbeans here). PSR-1 says both: Class names MUST be dec ...
I am looking for the correct way (if either is correct please let me know) to write namespaces in PHP classes that follow PSR-1 standard. I looked aro ...