Skip to content

Commit b6b5c2a

Browse files
committed
Adding PHP highlighting to code examples in README.md
1 parent efacb9b commit b6b5c2a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ In order to be able to properly use this plugin you'll have to add some constant
2424

2525
If default values for running PHPCS command does not match your environment (see https://github.com/Automattic/phpcs-diff/blob/master/class-phpcs-diff.php#L5 ), you need to override those via constants located in wp-config.php of your WordPress installation:
2626

27-
```
27+
```php
2828
define( 'PHPCS_DIFF_COMMAND', 'phpcs' );
2929
define( 'PHPCS_DIFF_STANDARDS', 'path/to/phpcs/standards' );
3030
```
3131

3232
Alternatively, if you are using the PHPCS_Diff class outside of this plugin, you can pass those in the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
3333

34-
```
34+
```php
3535
new PHPCS_Diff( new PHPCS_Diff_SVN( $repo ), array( 'phpcs_command' => 'my_phpcs_command', 'standards_location' => 'my/standards/location' ) );
3636
```
3737

@@ -41,30 +41,30 @@ new PHPCS_Diff( new PHPCS_Diff_SVN( $repo ), array( 'phpcs_command' => 'my_phpcs
4141

4242
You need to provide the plugin SVN credentials. This can be done using following constants put into wp-config.php file of your WordPress installation:
4343

44-
```
44+
```php
4545
define( 'PHPCS_DIFF_SVN_USERNAME', 'my_svn_username' );
4646
define( 'PHPCS_DIFF_SVN_PASSWORD', 'my_svn_password' );
4747
```
4848

4949
Alternatively, if you are using the `PHPCS_Diff` and `PHPCS_Diff_SVN` classes outside of this plugin, you can pass those via the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
5050

51-
```
51+
```php
5252
new PHPCS_Diff_SVN( $repo, array( 'svn_username' => 'my_username', 'svn_password' => 'my_password' ) );
5353
```
5454

5555
### Repository
5656

5757
You'll have to either register your repository in the `PHPCS_Diff_SVN`'s constructor ( [example](https://github.com/Automattic/phpcs-diff/blob/master/class-phpcs-diff-svn.php#L25,L27) ) or pass your own repository to the constructor via `(array) $options` param from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
5858

59-
```
59+
```php
6060
new PHPCS_Diff_SVN( $repo, array( 'repo_url' => 'https://plugins.svn.wordpress.org/hello-dolly' ) );
6161
```
6262

6363
# Running the WP CLI command
6464

6565
Example command run:
6666

67-
```
67+
```php
6868
wp phpcs-diff --repo="hello-dolly" --start_revision=99998 --end_revision=100000
6969
```
7070

0 commit comments

Comments
 (0)