Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Commit 5c50895

Browse files
committed
Merge tag '1.0.0-beta0009' into develop
Releasing 1.0.0-beta0009
2 parents b6027f3 + ec22dd4 commit 5c50895

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

CodeIgniter4/ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @author Louis Linehan <louis.linehan@gmail.com>
88
* @copyright 2017 Louis Linehan
99
* @license https://github.com/louisl/CodeIgniter4-Standard/blob/master/LICENSE MIT License
10-
* @version Version 1.0.0-beta0008
10+
* @version Version 1.0.0-beta0009
1111
-->
1212
<!--
1313
Files MUST have a doc block comment.

README.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[CodeIgniter](https://codeigniter.com) 4 coding standard for use with [PHP_CodeSniffer 3](https://github.com/squizlabs/PHP_CodeSniffer).
44

5-
Version 1.0.0-beta0008
5+
Version 1.0.0-beta0009
66

77
| Master | Develop |
88
| :---: | :---: |
@@ -34,34 +34,84 @@ Set the `phpcs standard path` and `phpcbf standard path` in your editor/plugin c
3434

3535
### Download install
3636

37-
Download [CodeIgniter4-Standard](https://github.com/louisl/CodeIgniter4-Standard/archive/v1.0.0-beta0008.zip).
37+
Download [CodeIgniter4-Standard](https://github.com/louisl/CodeIgniter4-Standard/archive/v1.0.0-beta0009.zip).
3838

3939
Set `standard ` paths to your local filesystem:
4040

4141
`'/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`
4242

43+
### Global install
44+
45+
Globally [install PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/README.md) with one of the various methods.
46+
47+
Once complete you should be able to execute `phpcs -i` on the command line.
48+
49+
You should see something like:-
50+
51+
`The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz and Zend.`
52+
53+
Either clone this repository...
54+
55+
`git clone -b master --depth 1 https://github.com/louisl/CodeIgniter4-Standard.git`.
56+
57+
or use composer...
58+
59+
`composer global require louisl/codeigniter4-standard`
60+
61+
or download.
62+
63+
Take note of the paths where they were installed.
64+
65+
Create a symbolic link to the `CodeIgniter4-Standard/CodeIgniter4` directory in `php_codesniffer/src/Standards/` eg.
66+
67+
`ln -s ~/Documents/Projects/CodeIgniter4-Standard/CodeIgniter4 ~/.composer/vendor/squizlabs/php_codesniffer/src/Standards/CodeIgniter4`
68+
69+
or copy the `CodeIgniter4-Standard/CodeIgniter4` directory to `php_codesniffer/src/Standards/`
70+
71+
Executing `phpcs -i` should now show CodeIgniter4 installed eg.
72+
73+
`The installed coding standards are CodeIgniter4, MySource, PEAR, PSR1, PSR2, Squiz and Zend.`
74+
75+
You should now be able to set 'CodeIgniter4' as the phpcs standard in the plugin/editor/IDE of your choice.
76+
4377
### Command line use
4478

4579
#### Sniffing errors & warnings (reporting).
4680

47-
Single file.
81+
Single file...
4882

4983
`phpcs /Path/To/MyFile.php --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`
5084

85+
or if globally installed.
86+
87+
`phpcs /Path/To/MyFile.php --standard=CodeIgniter4`
88+
5189
Directory (recursive).
5290

5391
`phpcs /Path/To/MyProject --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`
5492

93+
or if globally installed.
94+
95+
`phpcs /Path/To/MyProject --standard=CodeIgniter4`
96+
5597
#### Fixing fixable errors.
5698

5799
Single file.
58100

59101
`phpcbf /Path/To/MyFile.php --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`
60102

103+
or if globally installed.
104+
105+
`phpcbf /Path/To/MyFile.php --standard=CodeIgniter4`
106+
61107
Directory (recursive).
62108

63109
`phpcbf /Path/To/MyProject --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`
64110

111+
or if globally installed.
112+
113+
`phpcbf /Path/To/MyProject --standard=CodeIgniter4`
114+
65115
## Example editor configs
66116

67117
### SublimeText project config

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "louisl/codeigniter4-standard",
33
"description": "CodeIgniter 4 Standard for PHP_CodeSniffer 3.",
4-
"version":"1.0.0-beta0008",
4+
"version":"1.0.0-beta0009",
55
"license":"MIT",
66
"authors": [
77
{

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)