Skip to content

Commit 23ed0d8

Browse files
committed
Update schema URL in example code
1 parent bcc3d76 commit 23ed0d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wiki/About-Standards-for-PHP_CodeSniffer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Once you have a good name:
9090
* Create a file in that directory called `ruleset.xml` with the following contents and replace `StandardName` in the below code snippet with your chosen name.
9191
```xml
9292
<?xml version="1.0"?>
93-
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="StandardName" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
93+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="StandardName" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
9494

9595
</ruleset>
9696
```
@@ -106,7 +106,7 @@ Now you can start adding rules to the standard.
106106
For example, if your standard wants to enforce space indentation, you can add the `Generic.WhiteSpace.DisallowTabIndent` sniff to your ruleset:
107107
```xml
108108
<?xml version="1.0"?>
109-
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="YourStandardName" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
109+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="YourStandardName" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
110110

111111
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
112112

@@ -204,7 +204,7 @@ class OperatorSpacingSniff implements Sniff {...}
204204
Be sure to inform PHP_CodeSniffer about the namespace prefix by annotating it in the `ruleset.xml` file in the `namespace` attribute on the `ruleset` node:
205205
```xml
206206
<?xml version="1.0"?>
207-
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MyStandard" namespace="NS\Prefix\MyStandard" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
207+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MyStandard" namespace="NS\Prefix\MyStandard" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
208208

209209
</ruleset>
210210
```

0 commit comments

Comments
 (0)