Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CodeSniffer.conf.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$phpCodeSnifferConfig = array (
'default_standard' => 'PSR2',
'default_standard' => 'PSR12',
'report_format' => 'summary',
'show_warnings' => '0',
'show_progress' => '1',
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ php bin/phpcbf -h

## Getting Started

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:
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:
```bash
phpcs /path/to/code/myfile.php
```
Or if you wish to check an entire directory you can specify the directory location instead of a file.
```bash
phpcs /path/to/code-directory
```
If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument:
If you wish to check your code against the PEAR coding standard, use the `--standard` command line argument:
```bash
phpcs --standard=PSR12 /path/to/code-directory
phpcs --standard=PEAR /path/to/code-directory
```

If PHP_CodeSniffer finds any coding standard errors, a report will be shown after running the command.
Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function setCommandLineValues($args)
public function restoreDefaults()
{
$this->files = [];
$this->standards = ['PEAR'];
$this->standards = ['PSR12'];
$this->verbosity = 0;
$this->interactive = false;
$this->cache = false;
Expand Down