Questions tagged [psr-1]

PSR-1 is a PHP Standards Recommendation describing PHP's Basic Coding Standard.

PSR-1 is a Standards Recommendation describing PHP's Basic Coding Standard.

36 questions
0
votes
1 answer

Php Code Sniffer validation issues

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 solve :( Issue-1 Error: Opening parenthesis of a multi-line function call must be the last content…
0
votes
1 answer

How to interpret PSR-1 rule about method naming in the case of PHP constructors

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 declared in StudlyCaps. and : Method names MUST be declared in camelCase. That's of course very fine,…
Eusebius
  • 531
  • 6
  • 24
-1
votes
1 answer

PSR for class names and filenames of similar classes

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? Should I have: /Serializer Markdown.php (class Markdown) Json.php (class Json) Html.php…
dodov
  • 5,206
  • 3
  • 34
  • 65
-1
votes
1 answer

Unable to add codesniffer, psr-1, psr-2, pmd rules in sonarqube

Need to add codesniffer, psr-1, psr-2, pmd rules in sonarqube. I tried finding plugin but get sonar-php-codesniffer0.2 plugin which is compatible only upto sonarqube>2.0. Also there is no way to import custom php rules in sonarqube6.1 or updated…
YATIN GUPTA
  • 916
  • 9
  • 17
-1
votes
2 answers

PHP PSR validator

I am looking for a tool that can check my PHP codes and automatically update into as per PSR standard or atleast point out the places where code violates PSR standards. Google search was not too helpful. Is there a tool that can do it ?
Kamrul Khan
  • 3,260
  • 4
  • 32
  • 59
-5
votes
3 answers

Basic Coding Standard for HTML and CSS

I was wondering if their is a Basic Coding Standard for HTML and CSS like PSR-01. I tried googling and searching but didn't find any.
Scratch.
  • 343
  • 1
  • 6
  • 16
1 2
3