Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And example of how to set this up in PhpStorm is available here. Things you will need you will need to know:

Config ItemLocation
rule settesting/codesniffer/Rogo/ruleset.xml
code sniffervendor/squizlabs/php_codesniffer/bin/phpcs
code beautifiervendor/squizlabs/php_codesniffer/bin/phpcbf


The auto test environment uses code sniffer to ensure the code base meets the required coding standard.

...

  • Variables are not allowed in double quoted string, concatenation should be used instead
  • String that do not require double quotes should use single quotes instead
  • Multi-line strings concatenations should should align 4 spaces indentation from the first line e.g.


    Code Block
    languagephp
    $string = 'a string '
        . 'a concat'
        . 'another concat';


Some existing strings use double quotes when not necessary and so code sniffer will warn about it. However, new files will be expected to follow this and we should attempt to update existing code where possible.

...