Skip to content

Phpcs test #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 336 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
336 commits
Select commit Hold shift + click to select a range
293cadb
Apply coding standard
kamleshluhana Feb 17, 2023
8d5749e
Apply coding standard
kamleshluhana Feb 17, 2023
3d36ed3
Apply coding standard
kamleshluhana Feb 17, 2023
5842b4d
Apply coding standard
kamleshluhana Feb 17, 2023
fe16361
Apply coding standard
kamleshluhana Feb 17, 2023
d789e6a
Apply coding standard
kamleshluhana Feb 17, 2023
4f0ba7d
Coding standard issue fix
kamleshluhana Feb 17, 2023
b0ad9b2
Apply coding standard
kamleshluhana Feb 17, 2023
cfeb55f
Apply coding standard
kamleshluhana Feb 17, 2023
40dfe6f
Apply coding standard
kamleshluhana Feb 17, 2023
3a8c41a
Testing Workflow
kamleshluhana Feb 17, 2023
19db861
Coding Standard testing
kamleshluhana Feb 17, 2023
059493c
Coding Standard testing
kamleshluhana Feb 17, 2023
bc36827
Coding Standard testing
kamleshluhana Feb 17, 2023
39e84c7
Coding Standard testing
kamleshluhana Feb 17, 2023
1bd207c
Coding Standard testing
kamleshluhana Feb 17, 2023
e7718fe
Coding Standard testing
kamleshluhana Feb 17, 2023
af8c3bd
Coding Standard testing
kamleshluhana Feb 17, 2023
ee79cf5
Coding Standard testing
kamleshluhana Feb 17, 2023
5214e67
Coding Standard testing
kamleshluhana Feb 17, 2023
dec38c5
Coding Standard testing
kamleshluhana Feb 17, 2023
42fabc9
Coding Standard testing
kamleshluhana Feb 17, 2023
d338d64
Coding Standard testing
kamleshluhana Feb 17, 2023
2dd5757
Coding Standard testing
kamleshluhana Feb 18, 2023
2ed669a
Coding Standard testing
kamleshluhana Feb 18, 2023
85f3f20
Coding Standard testing
kamleshluhana Feb 18, 2023
79557db
Coding Standard testing
kamleshluhana Feb 18, 2023
b6f0c76
Coding Standard testing
kamleshluhana Feb 18, 2023
8fe7348
Coding Standard testing
kamleshluhana Feb 18, 2023
059983c
Coding Standard testing
kamleshluhana Feb 18, 2023
302e28f
Coding Standard testing
kamleshluhana Feb 18, 2023
522a66b
Coding Standard testing
kamleshluhana Feb 18, 2023
7e55071
Coding Standard testing
kamleshluhana Feb 18, 2023
825b151
Coding Standard testing
kamleshluhana Feb 18, 2023
2ad460d
Coding Standard testing
kamleshluhana Feb 18, 2023
56f5756
Coding Standard testing
kamleshluhana Feb 18, 2023
2c0e17a
Coding Standard testing
kamleshluhana Feb 18, 2023
06794ad
Coding Standard testing
kamleshluhana Feb 18, 2023
243e434
Coding Standard testing
kamleshluhana Feb 20, 2023
032ee9e
Coding Standard testing
kamleshluhana Feb 20, 2023
7b4a5c1
Coding Standard testing
kamleshluhana Feb 20, 2023
b587475
Coding Standard testing
kamleshluhana Feb 20, 2023
d26e548
Coding Standard testing
kamleshluhana Feb 20, 2023
06ecec4
Coding Standard testing
kamleshluhana Feb 20, 2023
14d92be
Coding Standard testing
kamleshluhana Feb 20, 2023
ce64ebf
Coding Standard testing
kamleshluhana Feb 20, 2023
12d4d8f
Coding Standard testing
kamleshluhana Feb 20, 2023
b284152
Coding Standard testing
kamleshluhana Feb 20, 2023
bbd7f25
Coding Standard testing
kamleshluhana Feb 20, 2023
dccd13d
Coding Standard testing
kamleshluhana Feb 20, 2023
9515feb
Coding Standard testing
kamleshluhana Feb 20, 2023
2040954
Coding Standard testing
kamleshluhana Feb 20, 2023
8c2bf12
Coding Standard testing
kamleshluhana Feb 20, 2023
5e5a3b2
Coding Standard testing
kamleshluhana Feb 20, 2023
f52c652
Coding Standard testing
kamleshluhana Feb 20, 2023
797d42c
GraphQL Tokenizer error fix
kamleshluhana Feb 20, 2023
bb2bfff
GraphQL Tokenizer error fix
kamleshluhana Feb 20, 2023
07bab5f
Tokenizer issue
kamleshluhana Feb 20, 2023
2600340
Tokenizer issue
kamleshluhana Feb 20, 2023
547fdaa
Coding Standard testing
kamleshluhana Feb 20, 2023
dcd8ac7
Coding Standard testing
kamleshluhana Feb 20, 2023
533003a
Coding Standard testing
kamleshluhana Feb 20, 2023
42f1048
Coding Standard testing
kamleshluhana Feb 20, 2023
1f7dc9b
Coding Standard testing
kamleshluhana Feb 20, 2023
405e80e
Coding Standard testing
kamleshluhana Feb 20, 2023
ecf551f
Coding Standard testing
kamleshluhana Feb 20, 2023
f12e7f9
Coding Standard testing
kamleshluhana Feb 20, 2023
09eb887
Coding Standard testing
kamleshluhana Feb 20, 2023
e778eb7
Coding Standard testing
kamleshluhana Feb 20, 2023
bc51cd0
Coding Standard testing
kamleshluhana Feb 20, 2023
9cb9359
Coding Standard testing
kamleshluhana Feb 20, 2023
e8bb5b2
Coding Standard testing
kamleshluhana Feb 20, 2023
ee98e18
Coding Standard testing
kamleshluhana Feb 20, 2023
77e8c7b
Coding Standard testing
kamleshluhana Feb 20, 2023
208408a
Coding Standard testing
kamleshluhana Feb 20, 2023
20a6824
Coding Standard testing
kamleshluhana Feb 20, 2023
8160b01
Coding Standard testing
kamleshluhana Feb 20, 2023
07e7cf4
Coding Standard testing
kamleshluhana Feb 20, 2023
92fe3f0
Coding Standard testing
kamleshluhana Feb 20, 2023
bb7414c
Coding Standard testing
kamleshluhana Feb 20, 2023
0651283
Coding Standard testing
kamleshluhana Feb 20, 2023
d80fc8b
Coding Standard testing
kamleshluhana Feb 20, 2023
caedce7
Coding Standard testing
kamleshluhana Feb 21, 2023
4244e55
Apply Standards - MageOS
kamleshluhana Feb 21, 2023
d0d9b14
Apply changes for MageOS standard
kamleshluhana Feb 21, 2023
1b54f9d
Apply changes for MageOS standard
kamleshluhana Feb 21, 2023
2afbba0
Review code sniffer baseline
kamleshluhana Feb 24, 2023
7aef590
Review code sniffer baseline
kamleshluhana Feb 24, 2023
ec4b28d
Review code sniffer baseline
kamleshluhana Feb 24, 2023
9e4ef9a
Review code sniffer baseline
kamleshluhana Feb 24, 2023
2e8029d
Review code sniffer baseline
kamleshluhana Feb 24, 2023
f89e2f0
Review code sniffer baseline
kamleshluhana Feb 24, 2023
07a0348
Review code sniffer baseline
kamleshluhana Feb 24, 2023
68af349
Review code sniffer baseline
kamleshluhana Feb 24, 2023
e5a8133
Review code sniffer baseline
kamleshluhana Feb 24, 2023
599d35f
Review code sniffer baseline
kamleshluhana Feb 24, 2023
f606cb6
Review code sniffer baseline
kamleshluhana Feb 24, 2023
124fad4
Review code sniffer baseline
kamleshluhana Feb 24, 2023
447e887
Review code sniffer baseline
kamleshluhana Feb 27, 2023
f5bad29
Review code sniffer baseline
kamleshluhana Feb 27, 2023
9be3034
Review code sniffer baseline
kamleshluhana Feb 27, 2023
b721117
Review code sniffer baseline
kamleshluhana Feb 27, 2023
e586691
Review code sniffer baseline
kamleshluhana Feb 27, 2023
133c366
Review code sniffer baseline
kamleshluhana Feb 27, 2023
8e3bcd6
Review code sniffer baseline
kamleshluhana Feb 27, 2023
0e3da02
Review code sniffer baseline
kamleshluhana Feb 27, 2023
f5dbe68
Review code sniffer baseline
kamleshluhana Feb 27, 2023
6c33170
Review code sniffer baseline
kamleshluhana Feb 27, 2023
c9fbdcd
Review code sniffer baseline
kamleshluhana Feb 27, 2023
dcd6297
Review code sniffer baseline
kamleshluhana Feb 27, 2023
4589430
Review code sniffer baseline
kamleshluhana Feb 27, 2023
cb2ecdb
Review code sniffer baseline
kamleshluhana Feb 27, 2023
41457db
Review code sniffer baseline
kamleshluhana Feb 27, 2023
9e4be8c
Review code sniffer baseline
kamleshluhana Feb 27, 2023
3953ebd
Review code sniffer baseline
kamleshluhana Feb 27, 2023
f6d47d8
Review code sniffer baseline
kamleshluhana Feb 27, 2023
ecf8f9f
Review code sniffer baseline
kamleshluhana Feb 27, 2023
1a1ae24
Review code sniffer baseline
kamleshluhana Feb 27, 2023
bdc20da
Review code sniffer baseline
kamleshluhana Mar 2, 2023
9348ab2
Review code sniffer baseline
kamleshluhana Mar 2, 2023
85bc61d
Review code sniffer baseline
kamleshluhana Mar 2, 2023
797e11c
Review code sniffer baseline
kamleshluhana Mar 2, 2023
e01134e
Review code sniffer baseline
kamleshluhana Mar 2, 2023
fe86f9c
Review code sniffer baseline
kamleshluhana Mar 2, 2023
956e175
Review code sniffer baseline
kamleshluhana Mar 2, 2023
d3c1286
Review code sniffer baseline
kamleshluhana Mar 2, 2023
67c0464
Review code sniffer baseline
kamleshluhana Mar 2, 2023
a854786
Review code sniffer baseline
kamleshluhana Mar 2, 2023
ff7962f
Review code sniffer baseline
kamleshluhana Mar 2, 2023
14a6386
Review code sniffer baseline
kamleshluhana Mar 2, 2023
eb708e6
Review code sniffer baseline
kamleshluhana Mar 2, 2023
f2abead
Review code sniffer baseline
kamleshluhana Mar 2, 2023
20f13a9
Review code sniffer baseline
kamleshluhana Mar 2, 2023
3cecb85
Review code sniffer testing
kamleshluhana Mar 7, 2023
d93b41c
Review code sniffer testing
kamleshluhana Mar 7, 2023
72f34ca
Review code sniffer testing
kamleshluhana Mar 7, 2023
119e255
Review code sniffer testing
kamleshluhana Mar 7, 2023
4c22f3b
Review code sniffer testing
kamleshluhana Mar 7, 2023
db92a19
Review code sniffer testing
kamleshluhana Mar 7, 2023
bb42d18
Review code sniffer testing
kamleshluhana Mar 7, 2023
2bcf456
Review code sniffer testing
kamleshluhana Mar 7, 2023
10f15ff
Review code sniffer testing
kamleshluhana Mar 7, 2023
2bf0732
Review code sniffer testing
kamleshluhana Mar 7, 2023
25d7a73
Review code sniffer testing
kamleshluhana Mar 7, 2023
b539099
Review code sniffer testing
kamleshluhana Mar 7, 2023
4e12b20
Review code sniffer testing
kamleshluhana Mar 7, 2023
64efcbe
Review code sniffer testing
kamleshluhana Mar 7, 2023
1f6646e
Review code sniffer testing
kamleshluhana Mar 7, 2023
35c001b
Review code sniffer testing
kamleshluhana Mar 7, 2023
d02b039
Review code sniffer testing
kamleshluhana Mar 7, 2023
88f0e57
Review code sniffer testing
kamleshluhana Mar 7, 2023
d49c398
Review code sniffer testing
kamleshluhana Mar 7, 2023
41ad764
Review code sniffer testing
kamleshluhana Mar 7, 2023
82ac9ff
Review code sniffer testing
kamleshluhana Mar 7, 2023
a2ce47a
Review code sniffer testing
kamleshluhana Mar 7, 2023
a3b178a
Review code sniffer testing
kamleshluhana Mar 7, 2023
fbdd995
Review code sniffer testing
kamleshluhana Mar 7, 2023
e951397
Review code sniffer testing
kamleshluhana Mar 7, 2023
665cbc4
Review code sniffer testing
kamleshluhana Mar 7, 2023
a0d007d
Review code sniffer testing
kamleshluhana Mar 7, 2023
31ccfe6
Review code sniffer testing
kamleshluhana Mar 7, 2023
7d208ab
Review code sniffer testing
kamleshluhana Mar 7, 2023
e05dee8
Review code sniffer testing
kamleshluhana Mar 7, 2023
2320afb
Review code sniffer testing
kamleshluhana Mar 7, 2023
eef6cf6
Review code sniffer testing
kamleshluhana Mar 7, 2023
da86a78
Review code sniffer testing
kamleshluhana Mar 7, 2023
be3b0b8
Review code sniffer testing
kamleshluhana Mar 7, 2023
65cd2a1
Review code sniffer testing
kamleshluhana Mar 7, 2023
a9030c1
Review code sniffer testing
kamleshluhana Mar 7, 2023
d126ec2
Review code sniffer testing
kamleshluhana Mar 7, 2023
e350c58
Review code sniffer testing
kamleshluhana Mar 7, 2023
2e2ccf5
Review code sniffer testing
kamleshluhana Mar 7, 2023
befae24
Review code sniffer testing
kamleshluhana Mar 7, 2023
ec947a6
Review code sniffer testing
kamleshluhana Mar 7, 2023
1b0c0ed
Review code sniffer testing
kamleshluhana Mar 7, 2023
b633979
Review code sniffer testing
kamleshluhana Mar 7, 2023
87b409a
Review code sniffer testing
kamleshluhana Mar 7, 2023
f9f973f
Review code sniffer testing
kamleshluhana Mar 14, 2023
a3872d9
Review code sniffer testing
kamleshluhana Mar 14, 2023
89f24c4
Review code sniffer testing
kamleshluhana Mar 14, 2023
197bb46
Review code sniffer testing
kamleshluhana Mar 14, 2023
52349c0
Review code sniffer testing
kamleshluhana Mar 14, 2023
47e03c0
Review code sniffer testing
kamleshluhana Mar 14, 2023
6dcd1d7
Review code sniffer testing
kamleshluhana Mar 14, 2023
580450c
Review code sniffer testing
kamleshluhana Mar 14, 2023
566f3aa
Review code sniffer testing
kamleshluhana Mar 14, 2023
6ff2d49
Review code sniffer testing
kamleshluhana Mar 14, 2023
7d4e1ac
Review code sniffer testing
kamleshluhana Mar 14, 2023
09c3d71
Review code sniffer testing
kamleshluhana Mar 14, 2023
37bec59
Review code sniffer testing
kamleshluhana Mar 14, 2023
c097637
Review code sniffer testing
kamleshluhana Mar 14, 2023
3d116d9
Review code sniffer testing
kamleshluhana Mar 14, 2023
4aa5bee
Review code sniffer testing
kamleshluhana Mar 14, 2023
516a563
Review code sniffer testing
kamleshluhana Mar 14, 2023
dfb03c1
Review code sniffer testing
kamleshluhana Mar 14, 2023
3da87dd
Review code sniffer testing
kamleshluhana Mar 14, 2023
20af2d5
Review code sniffer testing
kamleshluhana Mar 14, 2023
18b2fbc
Review code sniffer testing
kamleshluhana Mar 14, 2023
87a47d6
Review code sniffer testing
kamleshluhana Mar 15, 2023
281c9b1
Review code sniffer testing
kamleshluhana Mar 15, 2023
e305f20
Review code sniffer testing
kamleshluhana Mar 16, 2023
3cf1a28
Review code sniffer testing
kamleshluhana Mar 16, 2023
d2bfe01
Review code sniffer testing
kamleshluhana Mar 16, 2023
18569f8
Review code sniffer testing
kamleshluhana Mar 16, 2023
5b3c30d
Review code sniffer testing
kamleshluhana Mar 16, 2023
36425ce
Review code sniffer testing
kamleshluhana Mar 16, 2023
19bf0ac
Review code sniffer testing
kamleshluhana Mar 16, 2023
397f534
Review code sniffer testing
kamleshluhana Mar 16, 2023
8dee679
Review code sniffer testing
kamleshluhana Mar 16, 2023
69bf5c1
Review code sniffer testing
kamleshluhana Mar 16, 2023
f619e03
Review code sniffer testing
kamleshluhana Mar 16, 2023
795d10b
Review code sniffer testing
kamleshluhana Mar 18, 2023
dd3d85a
Review code sniffer testing
kamleshluhana Mar 18, 2023
4676429
Review code sniffer testing
kamleshluhana Mar 18, 2023
32a1e54
Review code sniffer testing
kamleshluhana Mar 18, 2023
8a0215d
Review code sniffer testing
kamleshluhana Mar 18, 2023
0b02720
Review code sniffer testing
kamleshluhana Mar 18, 2023
1f645a4
Review code sniffer testing
kamleshluhana Mar 18, 2023
1d4d86d
Review code sniffer testing
kamleshluhana Mar 18, 2023
a9abd65
Review code sniffer testing
kamleshluhana Mar 19, 2023
9a2803f
Review code sniffer testing
kamleshluhana Mar 19, 2023
20344ba
Review code sniffer testing
kamleshluhana Mar 19, 2023
d6cf8f4
Review code sniffer testing
kamleshluhana Mar 19, 2023
7c1359e
Review code sniffer testing
kamleshluhana Mar 19, 2023
e6b5397
Review code sniffer testing
kamleshluhana Mar 19, 2023
4c2a511
Review code sniffer testing
kamleshluhana Mar 19, 2023
8914257
Review code sniffer testing
kamleshluhana Mar 19, 2023
4504a14
Review code sniffer testing
kamleshluhana Mar 19, 2023
96192c6
Review code sniffer testing
kamleshluhana Mar 19, 2023
ec17a5c
Review code sniffer testing
kamleshluhana Mar 19, 2023
59273d6
Review code sniffer testing
kamleshluhana Mar 19, 2023
0cfad53
Review code sniffer testing
kamleshluhana Mar 19, 2023
8fe070f
Review code sniffer testing
kamleshluhana Mar 19, 2023
00fefa0
Review code sniffer testing
kamleshluhana Mar 19, 2023
afe724c
Review code sniffer testing
kamleshluhana Mar 19, 2023
47cc94d
Review code sniffer testing
kamleshluhana Mar 19, 2023
e93189b
Review code sniffer testing
kamleshluhana Mar 20, 2023
f91980e
Review code sniffer testing
kamleshluhana Mar 20, 2023
4933deb
Review code sniffer testing
kamleshluhana Mar 20, 2023
b81c134
Review code sniffer testing
kamleshluhana Mar 20, 2023
ed540e0
Review code sniffer testing
kamleshluhana Mar 20, 2023
896d3c1
Review code sniffer testing
kamleshluhana Mar 20, 2023
4fcbb12
Review code sniffer testing
kamleshluhana Mar 27, 2023
46e56b8
Review code sniffer testing
kamleshluhana Mar 27, 2023
07a9a7c
Review code sniffer testing
kamleshluhana Mar 27, 2023
9568992
Review code sniffer testing
kamleshluhana Mar 27, 2023
71c1022
Review code sniffer testing
kamleshluhana Mar 27, 2023
e5db2c9
Review code sniffer testing
kamleshluhana Mar 28, 2023
214e83d
Review code sniffer testing
kamleshluhana Mar 28, 2023
75a3208
Review code sniffer testing
kamleshluhana Mar 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .github/standard/vendor/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Contributing
-------------

Before you contribute code to PHP\_CodeSniffer, please make sure it conforms to the PHPCS coding standard and that the PHP\_CodeSniffer unit tests still pass. The easiest way to contribute is to work on a checkout of the repository, or your own fork, rather than an installed PEAR version. If you do this, you can run the following commands to check if everything is ready to submit:

cd PHP_CodeSniffer
php bin/phpcs

Which should display no coding standard errors. And then:

phpunit

Which should give you no failures or errors. You can ignore any skipped tests as these are for external tools.
9 changes: 9 additions & 0 deletions .github/standard/vendor/CodeSniffer.conf.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$phpCodeSnifferConfig = array (
'default_standard' => 'PSR2',
'report_format' => 'summary',
'show_warnings' => '0',
'show_progress' => '1',
'report_width' => '120',
);
?>
134 changes: 134 additions & 0 deletions .github/standard/vendor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
## About

PHP_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.

[![Build Status](https://github.com/squizlabs/PHP_CodeSniffer/workflows/Validate/badge.svg?branch=master)](https://github.com/squizlabs/PHP_CodeSniffer/actions)
[![Build Status](https://github.com/squizlabs/PHP_CodeSniffer/workflows/Test/badge.svg?branch=master)](https://github.com/squizlabs/PHP_CodeSniffer/actions)
[![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer)
[![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Requirements

PHP_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements.

If you're using PHP_CodeSniffer as part of a team, or you're running it on a [CI](https://en.wikipedia.org/wiki/Continuous_integration) server, you may want to configure your project's settings [using a configuration file](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file).


## Installation

The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands:
```
# Download using curl
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar

# Or download using wget
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar

# Then test the downloaded PHARs
php phpcs.phar -h
php phpcbf.phar -h
```

### Composer
If you use Composer, you can install PHP_CodeSniffer system-wide with the following command:
```bash
composer global require "squizlabs/php_codesniffer=*"
```
Make sure you have the composer bin dir in your PATH. The default value is `~/.composer/vendor/bin/`, but you can check the value that you need to use by running `composer global config bin-dir --absolute`.

Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:

```json
{
"require-dev": {
"squizlabs/php_codesniffer": "3.*"
}
}
```

You will then be able to run PHP_CodeSniffer from the vendor bin directory:
```bash
./vendor/bin/phpcs -h
./vendor/bin/phpcbf -h
```
### Phive
If you use Phive, you can install PHP_CodeSniffer as a project tool using the following commands:
```bash
phive install phpcs
phive install phpcbf
```
You will then be able to run PHP_CodeSniffer from the tools directory:
```bash
./tools/phpcs -h
./tools/phpcbf -h
```
### PEAR
If you use PEAR, you can install PHP_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:
```bash
pear install PHP_CodeSniffer
```
### Git Clone
You can also download the PHP_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone:
```bash
git clone https://github.com/squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php bin/phpcs -h
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:
```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:
```bash
phpcs --standard=PSR12 /path/to/code-directory
```

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

Full usage information and example reports are available on the [usage page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage).

## Documentation

The documentation for PHP_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki).

## Issues

Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/squizlabs/PHP_CodeSniffer/issues).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for information.

## Versioning

PHP_CodeSniffer uses a `MAJOR.MINOR.PATCH` version number format.

The `MAJOR` version is incremented when:
- backwards-incompatible changes are made to how the `phpcs` or `phpcbf` commands are used, or
- backwards-incompatible changes are made to the `ruleset.xml` format, or
- backwards-incompatible changes are made to the API used by sniff developers, or
- custom PHP_CodeSniffer token types are removed, or
- existing sniffs are removed from PHP_CodeSniffer entirely

The `MINOR` version is incremented when:
- new backwards-compatible features are added to the `phpcs` and `phpcbf` commands, or
- backwards-compatible changes are made to the `ruleset.xml` format, or
- backwards-compatible changes are made to the API used by sniff developers, or
- new sniffs are added to an included standard, or
- existing sniffs are removed from an included standard

> NOTE: Backwards-compatible changes to the API used by sniff developers will allow an existing sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required.

The `PATCH` version is incremented when:
- backwards-compatible bug fixes are made

> NOTE: As PHP_CodeSniffer exists to report and fix issues, most bugs are the result of coding standard errors being incorrectly reported or coding standard errors not being reported when they should be. This means that the messages produced by PHP_CodeSniffer, and the fixes it makes, are likely to be different between PATCH versions.
Loading