53 Commits

Author SHA1 Message Date
jrfnl
af9090900b Code Style Guide: update URL for PHP_CodeSniffer
... and small improvement to the text about running PHPCS in a git hook.

_When this text was originally written, the `--filter=GitStaged` option didn't exist yet, but now it does, it seems like a good pointer to add to the text._

Ref:
* https://github.com/squizlabs/PHP_CodeSniffer/issues/3932 (about the repo URL change)
* https://github.com/squizlabs/PHP_CodeSniffer/pull/2137 (about the GitStaged filter)
2024-02-12 14:52:13 +01:00
Peter Kokot
767c5cbb8c Add PER Coding Style 2023-02-03 17:31:20 +01:00
Peter Kokot
33b3c38aab Update PHP_CodeSniffer location to GitHub 2023-01-27 08:51:02 +01:00
Evgeny Chernyavskiy
c84de4c0ad Fix typos in the "Code style guide" post 2022-12-15 12:10:07 -05:00
Michiel Missotten
c27f195842 Update link to PHPCSFixer
Website moved from the sensiolabs.com domain to symfony.com domain.
2021-02-25 17:35:59 +01:00
Josh Lockhart
3ebe678af0 Update code style guide to use PSR-12, not PSR-2 2019-08-18 08:48:40 -04:00
Nikhil Ben Kuruvilla
96112e94bd Fixed php-cs-fixer cmd for applying PSR2 rule 2019-02-18 15:56:32 +05:30
Josh Lockhart
7ff86c5eb9 Add link to Clean Code PHP in Code Style sectionm 2018-06-20 08:14:03 -04:00
Josh Lockhart
4fd12a4742 Remove deprecated PSR0 from code style section 2018-06-19 13:04:28 -04:00
Euge Starr
0d9637ccf7 grammar fixes 2017-05-03 20:32:29 +12:00
William Turrell
9c3a17d024 Code Style Guide - project list
- Be bolder (some -> many)
- How can we not have Laravel…
2016-09-28 21:56:25 +01:00
Phil Sturgeon
f9b27c6ab5 Fixed conflicts for #648 2016-07-19 13:15:28 +01:00
Eric Poe
470cb1e571 Remove awkward clause.
The phrase about how well tested this library is  seems out of place
for a library that is compared to others in the same section. One would
assume that that all of these are well tested.
2016-07-16 14:05:12 -05:00
Eric Poe
859d12bbc4 Add text and examples for phpcbf and php-cs-fixer 2016-07-13 23:21:06 -05:00
Naveen Valecha
ced0fbcb20 Remove the another option thing out of Code Style Guide due to dead links. 2016-07-11 09:37:51 +05:30
Phil Sturgeon
6581312ed6 Link to "new" location of PSRs 2016-06-20 17:35:28 -04:00
Ken Guest
f626af3bd2 Remove line about phptools on ccirello's request.
ccirello is a maintainer of phpfmt/php.tools - so if he doesn't want his
project mentioned...
2016-05-27 09:34:42 +01:00
Ken Guest
83a7bd6920 Mention phpcbf in Coding Style Guide. 2016-04-06 20:42:43 +01:00
Carlos Cirello
77e11e88ca Update links for phpfmt tools. 2015-10-01 19:36:21 +02:00
Phil Sturgeon
3449797ad9 Merge pull request #553 from codeName007/20150211-Example_how_run_phpcs_manually_from_shell
Add example how run phpcs manually from shell.
2015-05-31 07:21:03 -05:00
Martin Keckeis
2a6000a646 Some update (see comment)
- remove ZF1 cs (since ZF2using now psr)
- php-cs-fixer is not "owned" by fabpot anymore
2015-02-17 12:57:38 +01:00
Vladimir Kovpak
1b31eeb626 Rephrased example how run phpcs manually from shell. 2015-02-11 16:01:21 +02:00
Vladimir Kovpak
59ca83053f Add example how run phpcs manually from shell. 2015-02-11 08:00:01 +02:00
Justinas
df1174b74c Zend standards url fixed. 2015-01-31 14:41:36 +02:00
jrfnl
2b11ae9c94 Spacing 2014-12-08 22:03:51 +01:00
jrfnl
82ee7ad76a Fix line wrapping consistency - round 1
Comply with the 'wrap at 120 chars' style rule stated in the contributing.md document
2014-12-08 22:03:47 +01:00
Carlos C
1cc6db9605 Fixing some grammatical mistakes 2014-12-01 20:55:25 +01:00
Carlos C
d06d426256 Replacing Zend with Magento 2014-12-01 19:06:54 +01:00
Carlos C
4c8392c5bc Rephrasing paragraph to accommodate both php.tools and PHP-CS-Fixer 2014-12-01 19:04:18 +01:00
Carlos C
7a15d7153b Adding php.tools as suggestion for tools to format source code 2014-11-29 23:16:32 +01:00
Eric Martel
7df82049e8 Redid anchor changes to be sure each doc was updated properly 2014-03-14 23:13:39 -04:00
Phil Sturgeon
822da9c725 Hi PSR-0, this is PSR-4. I'm coming for you. 2014-01-31 16:57:28 -05:00
Jacek Kobus
737c15f18e added link to symfony coding standards 2013-10-08 22:27:05 +02:00
Peter Kokot
1a935e0872 psr-3 link mark removed from coding style post since it is not used 2013-09-12 11:16:51 +02:00
dansmith
ca1835615a Minor (non-quote) grammar/spelling fixes 2013-07-15 15:32:35 +01:00
Phil Sturgeon
e7fadf48f5 Updated Code Style Guide
People were getting the idea that PSR's were being forced down their throats.

Now we're recommending the PEAR style guide (only ever intended for PEAR packages) and the Zend style guide (only ever meant for Zend projects) as well as the PSRs (only ever intended for FIG projects).
2013-03-01 15:20:47 -05:00
David Joos
10d5be6802 Addition of Symfony to the shortlist of projects 2013-02-11 09:30:13 +00:00
Akshay Agarwal
80e80579b6 Adding PSR-3 standards to the list 2013-01-21 03:26:27 +05:30
Pascal Borreli
52e44edd64 Fixed typos 2012-12-14 22:50:43 +00:00
Phil Sturgeon
ff14270630 Autocorrect fail 2012-10-16 22:17:53 -03:00
Phil Sturgeon
ced10a36c3 Never say "all"
I wrote previously about the PSR's that "They all add on to the recommendation before" which is of course entirely correct at the time of writing, but will not be the case going forwards as HTTP and Caching recommendations (or whatever happens next) become PSR-3, 4, 5, 345, etc.
2012-10-15 09:39:18 +02:00
Phil Sturgeon
086d8ea6b3 Merge pull request #150 from singles/code-language
Added information about writing code only in English to Code Style chapter
2012-10-14 06:38:25 -07:00
Phil Sturgeon
db59caf8fb Merge pull request #177 from akira28/w3c
Fixed w3c validator errors for "Duplicate ID"
2012-10-14 06:36:26 -07:00
Radosław Benkel
edd362fb87 Added short info about writing identifiers in English 2012-09-23 23:00:20 +02:00
andrea
d5d5d0725b Fixed w3c validator errors for "Duplicate ID" 2012-08-20 16:20:00 +02:00
Arlo O'Keeffe
4881145493 PHP_CodeSniffer includes PSR1+2 sniffs
It pointed me in the wrong direction when trying to use the recommendations of the document.
2012-08-15 15:42:41 -06:00
=
040691ca99 Wrap Coding Style to 120 chars 2012-07-16 08:11:59 -04:00
=
f7c51ca6ef Tweak coding style additions 2012-07-16 08:11:16 -04:00
Ken
b0fef2196e reword phpcs text slightly, also suggest fabpot's php-cs-fixer 2012-07-16 00:09:01 +01:00
Ken
b4a1fc832f suggest klaussilveira's phpcs sniff for checking code against the PSR-[1,2] recommendations 2012-07-14 01:37:13 +01:00