Skip to content

Commit 53b1cc0

Browse files
gsherwoodjrfnl
andcommitted
Change default standard from PEAR to PSR12
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
1 parent dec7de3 commit 53b1cc0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CodeSniffer.conf.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
$phpCodeSnifferConfig = array (
3-
'default_standard' => 'PSR2',
3+
'default_standard' => 'PSR12',
44
'report_format' => 'summary',
55
'show_warnings' => '0',
66
'show_progress' => '1',

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,17 @@ php bin/phpcbf -h
9898

9999
## Getting Started
100100

101-
The default coding standard used by PHP_CodeSniffer is the PEAR coding standard. To check a file against the PEAR coding standard, simply specify the file's location:
101+
The default coding standard used by PHP_CodeSniffer is the PSR12 coding standard. To check a file against the PSR12 coding standard, simply specify the file's location:
102102
```bash
103103
phpcs /path/to/code/myfile.php
104104
```
105105
Or if you wish to check an entire directory you can specify the directory location instead of a file.
106106
```bash
107107
phpcs /path/to/code-directory
108108
```
109-
If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument:
109+
If you wish to check your code against the PEAR coding standard, use the `--standard` command line argument:
110110
```bash
111-
phpcs --standard=PSR12 /path/to/code-directory
111+
phpcs --standard=PEAR /path/to/code-directory
112112
```
113113

114114
If PHP_CodeSniffer finds any coding standard errors, a report will be shown after running the command.

src/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function setCommandLineValues($args)
530530
public function restoreDefaults()
531531
{
532532
$this->files = [];
533-
$this->standards = ['PEAR'];
533+
$this->standards = ['PSR12'];
534534
$this->verbosity = 0;
535535
$this->interactive = false;
536536
$this->cache = false;

0 commit comments

Comments
 (0)